Fix hard-coded host group names in include tasks for group variables' file paths.

Signed-off-by: Eduard Egorov <eduard.egorov@icl-services.com>
pull/1063/head
Eduard Egorov 2016-11-01 11:39:21 +00:00
parent 59ee496088
commit 645b5efebf
4 changed files with 68 additions and 46 deletions

View File

@ -75,7 +75,7 @@
- include_vars: roles/ceph-mds/defaults/main.yml - include_vars: roles/ceph-mds/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mdss - include_vars: group_vars/{{ mds_group_name }}
failed_when: false failed_when: false
- name: stop ceph.target with systemd - name: stop ceph.target with systemd
@ -126,7 +126,7 @@
- include_vars: roles/ceph-rgw/defaults/main.yml - include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/rgws - include_vars: group_vars/{{ rgw_group_name }}
failed_when: false failed_when: false
- name: stop ceph.target with systemd - name: stop ceph.target with systemd
@ -177,7 +177,7 @@
- include_vars: roles/ceph-rbd-mirror/defaults/main.yml - include_vars: roles/ceph-rbd-mirror/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/rbd-mirrors - include_vars: group_vars/{{ rbdmirror_group_name }}
failed_when: false failed_when: false
- name: stop ceph.target with systemd - name: stop ceph.target with systemd
@ -222,7 +222,7 @@
- include_vars: roles/ceph-nfs/defaults/main.yml - include_vars: roles/ceph-nfs/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/nfss - include_vars: group_vars/{{ nfs_group_name }}
failed_when: false failed_when: false
- name: stop ceph.target with systemd - name: stop ceph.target with systemd
@ -291,12 +291,12 @@
- include_vars: roles/ceph-osd/defaults/main.yml - include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/osds - include_vars: group_vars/{{ osd_group_name }}
failed_when: false failed_when: false
- name: check for a device list - name: check for a device list
fail: fail:
msg: "OSD automatic discovery was detected, purge cluster does not support this scenario. If you want to purge the cluster, manually provide the list of devices in group_vars/osds using the devices variable." msg: "OSD automatic discovery was detected, purge cluster does not support this scenario. If you want to purge the cluster, manually provide the list of devices in group_vars/{{ osd_group_name }} using the devices variable."
when: when:
devices is not defined and devices is not defined and
osd_auto_discovery osd_auto_discovery
@ -430,6 +430,7 @@
vars: vars:
mon_group_name: mons mon_group_name: mons
restapi_group_name: restapis
hosts: hosts:
- "{{ mon_group_name }}" - "{{ mon_group_name }}"
@ -444,9 +445,9 @@
- include_vars: roles/ceph-restapi/defaults/main.yml - include_vars: roles/ceph-restapi/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mons - include_vars: group_vars/{{ mon_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/restapis - include_vars: group_vars/{{ restapi_group_name }}
failed_when: false failed_when: false
- name: stop ceph.target with systemd - name: stop ceph.target with systemd
@ -652,6 +653,15 @@
- name: purge fetch directory - name: purge fetch directory
vars:
mon_group_name: mons
osd_group_name: osds
mds_group_name: mdss
rgw_group_name: rgws
rbdmirror_group_name: rbdmirrors
nfs_group_name: nfss
restapi_group_name: restapis
hosts: hosts:
- localhost - localhost
@ -661,19 +671,19 @@
- include_vars: roles/ceph-common/defaults/main.yml - include_vars: roles/ceph-common/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mdss - include_vars: group_vars/{{ mds_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/rgws - include_vars: group_vars/{{ rgw_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/rbd-mirrors - include_vars: group_vars/{{ rbdmirror_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/nfss - include_vars: group_vars/{{ nfs_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/osds - include_vars: group_vars/{{ osd_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/mons - include_vars: group_vars/{{ mon_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/restapis - include_vars: group_vars/{{ restapi_group_name }}
failed_when: false failed_when: false
- name: purge fetch directory for localhost - name: purge fetch directory for localhost

View File

@ -59,7 +59,7 @@
- include_vars: roles/ceph-mds/defaults/main.yml - include_vars: roles/ceph-mds/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mdss - include_vars: group_vars/{{ mds_group_name }}
failed_when: false failed_when: false
- name: disable ceph mds service - name: disable ceph mds service
@ -105,7 +105,7 @@
- include_vars: roles/ceph-rgw/defaults/main.yml - include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/rgws - include_vars: group_vars/{{ rgw_group_name }}
failed_when: false failed_when: false
- name: disable ceph rgw service - name: disable ceph rgw service
@ -151,7 +151,7 @@
- include_vars: roles/ceph-rbd-mirror/defaults/main.yml - include_vars: roles/ceph-rbd-mirror/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/rbd-mirrors - include_vars: group_vars/{{ rbdmirror_group_name }}
failed_when: false failed_when: false
- name: disable ceph rbd-mirror service - name: disable ceph rbd-mirror service
@ -197,7 +197,7 @@
- include_vars: roles/ceph-nfs/defaults/main.yml - include_vars: roles/ceph-nfs/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/nfss - include_vars: group_vars/{{ nfs_group_name }}
failed_when: false failed_when: false
- name: disable ceph nfs service - name: disable ceph nfs service
@ -252,7 +252,7 @@
- include_vars: roles/ceph-osd/defaults/main.yml - include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/osds - include_vars: group_vars/{{ osd_group_name }}
failed_when: false failed_when: false
- name: disable ceph osd service - name: disable ceph osd service
@ -336,6 +336,7 @@
vars: vars:
mon_group_name: mons mon_group_name: mons
restapi_group_name: restapis
hosts: hosts:
- "{{ mon_group_name }}" - "{{ mon_group_name }}"
@ -348,9 +349,9 @@
- include_vars: roles/ceph-restapi/defaults/main.yml - include_vars: roles/ceph-restapi/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mons - include_vars: group_vars/{{ mon_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/restapis - include_vars: group_vars/{{ restapi_group_name }}
failed_when: false failed_when: false
- name: disable ceph mon service - name: disable ceph mon service
@ -593,6 +594,15 @@
- name: purge fetch directory - name: purge fetch directory
vars:
mon_group_name: mons
osd_group_name: osds
mds_group_name: mdss
rgw_group_name: rgws
rbdmirror_group_name: rbd-mirrors
nfs_group_name: nfss
restapi_group_name: restapis
hosts: hosts:
- localhost - localhost
@ -602,19 +612,19 @@
- include_vars: roles/ceph-common/defaults/main.yml - include_vars: roles/ceph-common/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mdss - include_vars: group_vars/{{ mds_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/rgws - include_vars: group_vars/{{ rgw_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/rbd-mirrors - include_vars: group_vars/{{ rbdmirror_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/nfss - include_vars: group_vars/{{ nfs_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/osds - include_vars: group_vars/{{ osd_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/mons - include_vars: group_vars/{{ mon_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/restapis - include_vars: group_vars/{{ restapi_group_name }}
failed_when: false failed_when: false
- name: purge fetch directory for localhost - name: purge fetch directory for localhost

View File

@ -64,6 +64,7 @@
vars: vars:
mon_group_name: mons mon_group_name: mons
restapi_group_name: restapis
health_mon_check_retries: 5 health_mon_check_retries: 5
health_mon_check_delay: 10 health_mon_check_delay: 10
@ -83,9 +84,9 @@
- include_vars: roles/ceph-restapi/defaults/main.yml - include_vars: roles/ceph-restapi/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mons - include_vars: group_vars/{{ mon_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/restapis - include_vars: group_vars/{{ restapi_group_name }}
failed_when: false failed_when: false
- name: restart ceph mons with upstart - name: restart ceph mons with upstart
@ -141,7 +142,7 @@
- include_vars: roles/ceph-osd/defaults/main.yml - include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/osds - include_vars: group_vars/{{ osd_group_name }}
failed_when: false failed_when: false
- name: set osd flags - name: set osd flags
@ -161,7 +162,7 @@
- include_vars: roles/ceph-osd/defaults/main.yml - include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/osds - include_vars: group_vars/{{ osd_group_name }}
failed_when: false failed_when: false
- name: get osd numbers - name: get osd numbers
@ -227,7 +228,7 @@
- include_vars: roles/ceph-mds/defaults/main.yml - include_vars: roles/ceph-mds/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mdss - include_vars: group_vars/{{ mds_group_name }}
failed_when: false failed_when: false
- name: restart ceph mdss with upstart - name: restart ceph mdss with upstart
@ -272,7 +273,7 @@
- include_vars: roles/ceph-rgw/defaults/main.yml - include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/rgws - include_vars: group_vars/{{ rgw_group_name }}
failed_when: false failed_when: false
- name: restart ceph rgws with systemd - name: restart ceph rgws with systemd

View File

@ -94,6 +94,7 @@
vars: vars:
mon_group_name: mons mon_group_name: mons
restapi_group_name: restapis
hosts: hosts:
- "{{ mon_group_name }}" - "{{ mon_group_name }}"
@ -107,9 +108,9 @@
- include_vars: roles/ceph-restapi/defaults/main.yml - include_vars: roles/ceph-restapi/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mons - include_vars: group_vars/{{ mon_group_name }}
failed_when: false failed_when: false
- include_vars: group_vars/restapis - include_vars: group_vars/{{ restapi_group_name }}
failed_when: false failed_when: false
- name: select a running monitor - name: select a running monitor
@ -196,7 +197,7 @@
- include_vars: roles/ceph-osd/defaults/main.yml - include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/osds - include_vars: group_vars/{{ osd_group_name }}
failed_when: false failed_when: false
- name: collect osd ids - name: collect osd ids
@ -301,7 +302,7 @@
- include_vars: roles/ceph-mds/defaults/main.yml - include_vars: roles/ceph-mds/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/mdss - include_vars: group_vars/{{ mds_group_name }}
failed_when: false failed_when: false
- name: stop ceph mds service - name: stop ceph mds service
@ -361,7 +362,7 @@
- include_vars: roles/ceph-rgw/defaults/main.yml - include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/rgws - include_vars: group_vars/{{ rgw_group_name }}
failed_when: false failed_when: false
- name: stop ceph rgw service - name: stop ceph rgw service
@ -422,7 +423,7 @@
- include_vars: roles/ceph-rbd-mirror/defaults/main.yml - include_vars: roles/ceph-rbd-mirror/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/rbd-mirrors - include_vars: group_vars/{{ rbdmirror_group_name }}
failed_when: false failed_when: false
- name: stop ceph rbd mirror service - name: stop ceph rbd mirror service
@ -481,7 +482,7 @@
- include_vars: roles/ceph-nfs/defaults/main.yml - include_vars: roles/ceph-nfs/defaults/main.yml
- include_vars: group_vars/all - include_vars: group_vars/all
failed_when: false failed_when: false
- include_vars: group_vars/nfss - include_vars: group_vars/{{ nfs_group_name }}
failed_when: false failed_when: false
- name: stop ceph nfs service - name: stop ceph nfs service