mirror of https://github.com/ceph/ceph-ansible.git
purge: drop variables from 'hosts' sections
Those variables are useless given this is not possible to override them. Let's replace them with the hardcoded name instead. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/6748/head
parent
738fa9428a
commit
6b50401d0c
|
@ -32,15 +32,15 @@
|
|||
|
||||
- name: gather facts on all hosts
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ nfs_group_name | default('nfss') }}"
|
||||
- "{{ client_group_name | default('clients') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
- "{{ monitoring_group_name | default('monitoring') }}"
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- nfss
|
||||
- clients
|
||||
- mgrs
|
||||
- monitoring
|
||||
become: true
|
||||
tasks:
|
||||
- debug:
|
||||
|
@ -48,8 +48,9 @@
|
|||
|
||||
|
||||
- name: check there's no ceph kernel threads present
|
||||
hosts: "{{ client_group_name | default('clients') }}"
|
||||
hosts: clients
|
||||
become: true
|
||||
gather_facts: false
|
||||
any_errors_fatal: true
|
||||
tasks:
|
||||
- import_role:
|
||||
|
@ -108,9 +109,7 @@
|
|||
|
||||
|
||||
- name: purge ceph nfs cluster
|
||||
vars:
|
||||
nfs_group_name: nfss
|
||||
hosts: "{{ nfs_group_name | default('nfss') }}"
|
||||
hosts: nfss
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -124,16 +123,15 @@
|
|||
|
||||
- name: purge node-exporter
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ nfs_group_name | default('nfss') }}"
|
||||
- "{{ client_group_name | default('clients') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
- "{{ monitoring_group_name | default('monitoring') }}"
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- nfss
|
||||
- clients
|
||||
- mgrs
|
||||
- monitoring
|
||||
- iscsigws
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -225,9 +223,7 @@
|
|||
|
||||
|
||||
- name: purge ceph mds cluster
|
||||
vars:
|
||||
mds_group_name: mdss
|
||||
hosts: "{{ mds_group_name | default('mdss') }}"
|
||||
hosts: mdss
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -240,9 +236,7 @@
|
|||
|
||||
|
||||
- name: purge ceph mgr cluster
|
||||
vars:
|
||||
mgr_group_name: mgrs
|
||||
hosts: "{{ mgr_group_name | default('mgrs') }}"
|
||||
hosts: mgrs
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -256,10 +250,7 @@
|
|||
|
||||
|
||||
- name: purge rgwloadbalancer cluster
|
||||
vars:
|
||||
rgwloadbalancer_group_name: rgwloadbalancers
|
||||
hosts:
|
||||
- "{{ rgwloadbalancer_group_name | default('rgwloadbalancers') }}"
|
||||
hosts: rgwloadbalancers
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -272,9 +263,7 @@
|
|||
|
||||
|
||||
- name: purge ceph rgw cluster
|
||||
vars:
|
||||
rgw_group_name: rgws
|
||||
hosts: "{{ rgw_group_name | default('rgws') }}"
|
||||
hosts: rgws
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -295,9 +284,7 @@
|
|||
|
||||
|
||||
- name: purge ceph rbd-mirror cluster
|
||||
vars:
|
||||
rbdmirror_group_name: rbdmirrors
|
||||
hosts: "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
hosts: rbdmirrors
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -310,9 +297,8 @@
|
|||
|
||||
- name: purge ceph osd cluster
|
||||
vars:
|
||||
osd_group_name: osds
|
||||
reboot_osd_node: False
|
||||
hosts: "{{ osd_group_name | default('osds') }}"
|
||||
hosts: osds
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
handlers:
|
||||
|
@ -561,9 +547,7 @@
|
|||
|
||||
|
||||
- name: purge ceph mon cluster
|
||||
vars:
|
||||
mon_group_name: mons
|
||||
hosts: "{{ mon_group_name|default('mons') }}"
|
||||
hosts: mons
|
||||
gather_facts: false # already gathered previously
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -593,12 +577,12 @@
|
|||
|
||||
- name: purge ceph-crash daemons
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- mgrs
|
||||
gather_facts: false
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -648,15 +632,15 @@
|
|||
- keepalived
|
||||
- haproxy
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ nfs_group_name | default('nfss') }}"
|
||||
- "{{ client_group_name | default('clients') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
- "{{ monitoring_group_name | default('monitoring') }}"
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- nfss
|
||||
- clients
|
||||
- mgrs
|
||||
- monitoring
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
handlers:
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
|
||||
- name: check there's no ceph kernel threads present
|
||||
hosts: "{{ client_group_name|default('clients') }}"
|
||||
hosts: clients
|
||||
become: true
|
||||
any_errors_fatal: true
|
||||
tasks:
|
||||
|
@ -91,7 +91,7 @@
|
|||
|
||||
|
||||
- name: purge ceph nfs cluster
|
||||
hosts: "{{ nfs_group_name | default('nfss') }}"
|
||||
hosts: nfss
|
||||
become: true
|
||||
tasks:
|
||||
- name: disable ceph nfs service
|
||||
|
@ -117,7 +117,7 @@
|
|||
|
||||
|
||||
- name: purge ceph mds cluster
|
||||
hosts: "{{ mds_group_name | default('mdss') }}"
|
||||
hosts: mdss
|
||||
become: true
|
||||
tasks:
|
||||
- name: disable ceph mds service
|
||||
|
@ -134,7 +134,7 @@
|
|||
|
||||
|
||||
- name: purge ceph iscsigws cluster
|
||||
hosts: "{{ iscsi_gw_group_name | default('iscsigws') }}"
|
||||
hosts: iscsigws
|
||||
become: true
|
||||
tasks:
|
||||
- name: disable ceph iscsigw services
|
||||
|
@ -160,7 +160,7 @@
|
|||
|
||||
|
||||
- name: purge ceph mgr cluster
|
||||
hosts: "{{ mgr_group_name | default('mgrs') }}"
|
||||
hosts: mgrs
|
||||
become: true
|
||||
tasks:
|
||||
- name: disable ceph mgr service
|
||||
|
@ -177,7 +177,7 @@
|
|||
|
||||
|
||||
- name: purge ceph rgw cluster
|
||||
hosts: "{{ rgw_group_name | default('rgws') }}"
|
||||
hosts: rgws
|
||||
become: true
|
||||
tasks:
|
||||
- import_role:
|
||||
|
@ -202,7 +202,7 @@
|
|||
|
||||
|
||||
- name: purge ceph rbd-mirror cluster
|
||||
hosts: "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
hosts: rbdmirrors
|
||||
become: true
|
||||
tasks:
|
||||
- name: disable ceph rbd-mirror service
|
||||
|
@ -219,8 +219,7 @@
|
|||
|
||||
|
||||
- name: purge ceph osd cluster
|
||||
hosts: "{{ osd_group_name | default('osds') }}"
|
||||
gather_facts: true
|
||||
hosts: osds
|
||||
become: true
|
||||
tasks:
|
||||
- import_role:
|
||||
|
@ -310,7 +309,7 @@
|
|||
|
||||
|
||||
- name: purge ceph mon cluster
|
||||
hosts: "{{ mon_group_name|default('mons') }}"
|
||||
hosts: mons
|
||||
become: true
|
||||
tasks:
|
||||
# since mgr are now collocated with mons by default
|
||||
|
@ -335,14 +334,14 @@
|
|||
|
||||
- name: purge node-exporter
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ nfs_group_name | default('nfss') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
- "{{ monitoring_group_name | default('monitoring') }}"
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- nfss
|
||||
- mgrs
|
||||
- monitoring
|
||||
- iscsigws
|
||||
- clients
|
||||
gather_facts: false
|
||||
|
@ -437,12 +436,12 @@
|
|||
|
||||
- name: purge ceph-crash containers
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- mgrs
|
||||
gather_facts: false
|
||||
become: true
|
||||
tasks:
|
||||
|
@ -467,14 +466,13 @@
|
|||
|
||||
- name: check container hosts
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ nfs_group_name | default('nfss') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
gather_facts: true
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- nfss
|
||||
- mgrs
|
||||
become: true
|
||||
tasks:
|
||||
- import_role:
|
||||
|
@ -509,14 +507,14 @@
|
|||
|
||||
- name: final cleanup
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ nfs_group_name | default('nfss') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
- "{{ monitoring_group_name | default('monitoring') }}"
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- nfss
|
||||
- mgrs
|
||||
- monitoring
|
||||
become: true
|
||||
tags: with_pkg
|
||||
tasks:
|
||||
|
@ -625,13 +623,13 @@
|
|||
|
||||
- name: purge ceph directories
|
||||
hosts:
|
||||
- "{{ mon_group_name | default('mons') }}"
|
||||
- "{{ osd_group_name | default('osds') }}"
|
||||
- "{{ mds_group_name | default('mdss') }}"
|
||||
- "{{ rgw_group_name | default('rgws') }}"
|
||||
- "{{ rbdmirror_group_name | default('rbdmirrors') }}"
|
||||
- "{{ nfs_group_name | default('nfss') }}"
|
||||
- "{{ mgr_group_name | default('mgrs') }}"
|
||||
- mons
|
||||
- osds
|
||||
- mdss
|
||||
- rgws
|
||||
- rbdmirrors
|
||||
- nfss
|
||||
- mgrs
|
||||
gather_facts: false # Already gathered previously
|
||||
become: true
|
||||
tasks:
|
||||
|
|
Loading…
Reference in New Issue