All `include_vars` need to have `*.yml`, `*.yaml` or `*.json` extension.

As introduced in the following PR:
- https://github.com/ansible/ansible/pull/17207
we need to refactor our code.
pull/1113/head
Guillaume Abrioux 2016-11-23 11:14:32 +01:00
parent a5e00fea86
commit a680707f6f
23 changed files with 79 additions and 79 deletions

View File

@ -54,7 +54,7 @@ please use the `ceph_conf_overrides` variable.
## Special notes
If you are looking at deploying a Ceph version older than Jewel.
It is highly recommended that you apply the following settings to your `group_vars/all` file on the `ceph_conf_overrides` variable:
It is highly recommended that you apply the following settings to your `group_vars/all.yml` file on the `ceph_conf_overrides` variable:
```
ceph_conf_overrides:
@ -171,7 +171,7 @@ $ vagrant provision
The Vagrantfile specifies an fsid for the cluster and a secret key for the
monitor. If using these playbooks in production, you must generate your own `fsid`
in `group_vars/all` and `monitor_secret` in `group_vars/mons`. Those files contain
in `group_vars/all.yml` and `monitor_secret` in `group_vars/mons.yml`. Those files contain
information about how to generate appropriate values for these variables.
## Specifying package origin
@ -243,7 +243,7 @@ Attention, ceph-common doesn't manage backports repository, you must add it your
### For Atomic systems
If you want to run containerized deployment on Atomic systems (RHEL/CentOS Atomic), please copy
[vagrant_variables.yml.atomic](vagrant_variables.yml.atomic) to vagrant_variables.yml, and copy [group_vars/all.docker](group_vars/all.docker) to `group_vars/all`.
[vagrant_variables.yml.atomic](vagrant_variables.yml.atomic) to vagrant_variables.yml, and copy [group_vars/all.docker.yml.sample](group_vars/all.docker.yml.sample) to `group_vars/all.yml`.
Since `centos/atomic-host` VirtualBox box doesn't have spare storage controller to attach more disks, it is likely the first time `vagrant up --provider=virtualbox` runs, it will fail to attach to a storage controller. In such case, run the following command:
@ -259,7 +259,7 @@ Install the Vagrant plugin for the openstack provider: `vagrant plugin install v
```bash
$ cp site.yml.sample site.yml
$ cp group_vars/all.docker.sample group_vars/all
$ cp group_vars/all.docker.yml.sample group_vars/all.yml
$ cp vagrant_variables.yml.openstack vagrant_variables.yml
```
* Edit `vagrant_variables.yml`:

View File

@ -89,24 +89,24 @@ function ssh_setup {
}
function cp_var {
cp group_vars/all.sample group_vars/all
cp group_vars/osds.sample group_vars/osds
cp group_vars/all.yml.sample group_vars/all.yml
cp group_vars/osds.yml.sample group_vars/osds.yml
cp site.yml.sample site.yml
}
function populate_vars {
sed -i "s/#osd_auto_discovery: false/osd_auto_discovery: true/" group_vars/osds
sed -i "s/#journal_collocation: false/journal_collocation: true/" group_vars/osds
sed -i "s/#pool_default_size: 3/pool_default_size: 2/" group_vars/all
sed -i "s/#monitor_address: 0.0.0.0/monitor_address: ${IP}/" group_vars/all
sed -i "s/#journal_size: 0/journal_size: 100/" group_vars/all
sed -i "s|#public_network: 0.0.0.0\/0|public_network: ${SUBNET}|" group_vars/all
sed -i "s/#common_single_host_mode: true/common_single_host_mode: true/" group_vars/all
sed -i "s/#osd_auto_discovery: false/osd_auto_discovery: true/" group_vars/osds.yml
sed -i "s/#journal_collocation: false/journal_collocation: true/" group_vars/osds.yml
sed -i "s/#pool_default_size: 3/pool_default_size: 2/" group_vars/all.yml
sed -i "s/#monitor_address: 0.0.0.0/monitor_address: ${IP}/" group_vars/all.yml
sed -i "s/#journal_size: 0/journal_size: 100/" group_vars/all.yml
sed -i "s|#public_network: 0.0.0.0\/0|public_network: ${SUBNET}|" group_vars/all.yml
sed -i "s/#common_single_host_mode: true/common_single_host_mode: true/" group_vars/all.yml
if [[ ${SOURCE} == 'stable' ]]; then
sed -i "s/#ceph_stable: false/ceph_stable: true/" group_vars/all
sed -i "s/#ceph_stable: false/ceph_stable: true/" group_vars/all.yml
else
sed -i "s/#ceph_dev: false/ceph_dev: true/" group_vars/all
sed -i "s|#ceph_dev_branch: master|ceph_dev_branch: ${BRANCH}|" group_vars/all
sed -i "s/#ceph_dev: false/ceph_dev: true/" group_vars/all.yml
sed -i "s|#ceph_dev_branch: master|ceph_dev_branch: ${BRANCH}|" group_vars/all.yml
fi
}

View File

@ -7,13 +7,13 @@ basedir=$(dirname "$0")
for role in "$basedir"/roles/ceph-*; do
rolename=$(basename "$role")
if [[ $rolename == "ceph-common" ]]; then
output="all.sample"
output="all.yml.sample"
elif [[ $rolename == "ceph-agent" ]]; then
output="agent.sample"
output="agent.yml.sample"
elif [[ $rolename == "ceph-fetch-keys" ]]; then
output="ceph-fetch-keys.sample"
output="ceph-fetch-keys.yml.sample"
else
output="${rolename:5}s.sample"
output="${rolename:5}s.yml.sample"
fi
cat <<EOF > "$basedir"/group_vars/"$output"

View File

@ -73,9 +73,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-mds/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ mds_group_name }}
- include_vars: group_vars/{{ mds_group_name }}.yml
failed_when: false
- name: stop ceph.target with systemd
@ -124,9 +124,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ rgw_group_name }}
- include_vars: group_vars/{{ rgw_group_name }}.yml
failed_when: false
- name: stop ceph.target with systemd
@ -175,9 +175,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rbd-mirror/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ rbdmirror_group_name }}
- include_vars: group_vars/{{ rbdmirror_group_name }}.yml
failed_when: false
- name: stop ceph.target with systemd
@ -220,9 +220,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-nfs/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ nfs_group_name }}
- include_vars: group_vars/{{ nfs_group_name }}.yml
failed_when: false
- name: stop ceph.target with systemd
@ -289,9 +289,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ osd_group_name }}
- include_vars: group_vars/{{ osd_group_name }}.yml
failed_when: false
- name: check for a device list
@ -443,11 +443,11 @@
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-mon/defaults/main.yml
- include_vars: roles/ceph-restapi/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ mon_group_name }}
- include_vars: group_vars/{{ mon_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ restapi_group_name }}
- include_vars: group_vars/{{ restapi_group_name }}.yml
failed_when: false
- name: stop ceph.target with systemd
@ -669,21 +669,21 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ mds_group_name }}
- include_vars: group_vars/{{ mds_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ rgw_group_name }}
- include_vars: group_vars/{{ rgw_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ rbdmirror_group_name }}
- include_vars: group_vars/{{ rbdmirror_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ nfs_group_name }}
- include_vars: group_vars/{{ nfs_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ osd_group_name }}
- include_vars: group_vars/{{ osd_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ mon_group_name }}
- include_vars: group_vars/{{ mon_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ restapi_group_name }}
- include_vars: group_vars/{{ restapi_group_name }}.yml
failed_when: false
- name: purge fetch directory for localhost

View File

@ -57,9 +57,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-mds/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ mds_group_name }}
- include_vars: group_vars/{{ mds_group_name }}.yml
failed_when: false
- name: disable ceph mds service
@ -103,9 +103,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ rgw_group_name }}
- include_vars: group_vars/{{ rgw_group_name }}.yml
failed_when: false
- name: disable ceph rgw service
@ -149,9 +149,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rbd-mirror/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ rbdmirror_group_name }}
- include_vars: group_vars/{{ rbdmirror_group_name }}.yml
failed_when: false
- name: disable ceph rbd-mirror service
@ -195,9 +195,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-nfs/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ nfs_group_name }}
- include_vars: group_vars/{{ nfs_group_name }}.yml
failed_when: false
- name: disable ceph nfs service
@ -250,9 +250,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ osd_group_name }}
- include_vars: group_vars/{{ osd_group_name }}.yml
failed_when: false
- name: disable ceph osd service
@ -347,11 +347,11 @@
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-mon/defaults/main.yml
- include_vars: roles/ceph-restapi/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ mon_group_name }}
- include_vars: group_vars/{{ mon_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ restapi_group_name }}
- include_vars: group_vars/{{ restapi_group_name }}.yml
failed_when: false
- name: disable ceph mon service
@ -610,21 +610,21 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ mds_group_name }}
- include_vars: group_vars/{{ mds_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ rgw_group_name }}
- include_vars: group_vars/{{ rgw_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ rbdmirror_group_name }}
- include_vars: group_vars/{{ rbdmirror_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ nfs_group_name }}
- include_vars: group_vars/{{ nfs_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ osd_group_name }}
- include_vars: group_vars/{{ osd_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ mon_group_name }}
- include_vars: group_vars/{{ mon_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ restapi_group_name }}
- include_vars: group_vars/{{ restapi_group_name }}.yml
failed_when: false
- name: purge fetch directory for localhost

View File

@ -28,7 +28,7 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
- name: exit playbook, if user did not mean to shrink cluster
fail:

View File

@ -28,7 +28,7 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
- name: exit playbook, if user did not mean to shrink cluster
fail:

View File

@ -106,11 +106,11 @@
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-mon/defaults/main.yml
- include_vars: roles/ceph-restapi/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ mon_group_name }}
- include_vars: group_vars/{{ mon_group_name }}.yml
failed_when: false
- include_vars: group_vars/{{ restapi_group_name }}
- include_vars: group_vars/{{ restapi_group_name }}.yml
failed_when: false
- name: select a running monitor
@ -195,9 +195,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ osd_group_name }}
- include_vars: group_vars/{{ osd_group_name }}.yml
failed_when: false
- name: collect osd ids
@ -300,9 +300,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-mds/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ mds_group_name }}
- include_vars: group_vars/{{ mds_group_name }}.yml
failed_when: false
- name: stop ceph mds service
@ -360,9 +360,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ rgw_group_name }}
- include_vars: group_vars/{{ rgw_group_name }}.yml
failed_when: false
- name: stop ceph rgw service
@ -421,9 +421,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rbd-mirror/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ rbdmirror_group_name }}
- include_vars: group_vars/{{ rbdmirror_group_name }}.yml
failed_when: false
- name: stop ceph rbd mirror service
@ -480,9 +480,9 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-nfs/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
failed_when: false
- include_vars: group_vars/{{ nfs_group_name }}
- include_vars: group_vars/{{ nfs_group_name }}.yml
failed_when: false
- name: stop ceph nfs service

View File

@ -15,7 +15,7 @@
become: True
vars_files:
- roles/ceph-common/defaults/main.yml
- group_vars/all
- group_vars/all.yml
roles:
- ceph-fetch-keys
@ -24,7 +24,7 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: group_vars/all
- include_vars: group_vars/all.yml
- name: get the name of the existing ceph cluster
shell: "ls /etc/ceph/*.conf"