Merge pull request #931 from font/rbdmirror_purge

Update for containerized purge cluster playbook
pull/945/head
Leseb 2016-08-19 18:31:46 +02:00 committed by GitHub
commit 88138324cb
1 changed files with 101 additions and 18 deletions

View File

@ -58,6 +58,9 @@
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-mds/defaults/main.yml
- include_vars: group_vars/all
ignore_errors: true
- include_vars: group_vars/mdss
ignore_errors: true
- name: disable ceph mds service
service:
@ -101,6 +104,9 @@
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rgw/defaults/main.yml
- include_vars: group_vars/all
ignore_errors: true
- include_vars: group_vars/rgws
ignore_errors: true
- name: disable ceph rgw service
service:
@ -130,6 +136,52 @@
remove_img
- name: purge ceph rbd-mirror cluster
vars:
rbdmirror_group_name: rbd_mirrors
hosts:
- "{{ rbdmirror_group_name }}"
become: true
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-rbd-mirror/defaults/main.yml
- include_vars: group_vars/all
ignore_errors: true
- include_vars: group_vars/rbd-mirrors
ignore_errors: true
- name: disable ceph rbd-mirror service
service:
name: "ceph-rbd-mirror@{{ ansible_hostname }}"
state: stopped
enabled: no
ignore_errors: true
- name: remove ceph rbd-mirror container
docker:
image: "{{ ceph_rbd_mirror_docker_username }}/{{ ceph_rbd_mirror_docker_imagename }}:{{ ceph_rbd_mirror_docker_image_tag }}"
name: "{{ ansible_hostname }}"
state: absent
ignore_errors: true
- name: remove ceph rbd-mirror service
file:
path: /etc/systemd/system/ceph-rbd-mirror@.service
state: absent
- name: remove ceph rbd-mirror image
docker_image:
state: absent
name: "{{ ceph_rbd_mirror_docker_username }}/{{ ceph_rbd_mirror_docker_imagename }}"
tag: "{{ ceph_rbd_mirror_docker_image_tag }}"
tags:
remove_img
- name: purge ceph nfs cluster
vars:
@ -144,6 +196,9 @@
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-nfs/defaults/main.yml
- include_vars: group_vars/all
ignore_errors: true
- include_vars: group_vars/nfss
ignore_errors: true
- name: disable ceph nfs service
service:
@ -196,6 +251,9 @@
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: roles/ceph-osd/defaults/main.yml
- include_vars: group_vars/all
ignore_errors: true
- include_vars: group_vars/osds
ignore_errors: true
- name: disable ceph osd service
service:
@ -289,6 +347,11 @@
- include_vars: roles/ceph-mon/defaults/main.yml
- include_vars: roles/ceph-restapi/defaults/main.yml
- include_vars: group_vars/all
ignore_errors: true
- include_vars: group_vars/mons
ignore_errors: true
- include_vars: group_vars/restapis
ignore_errors: true
- name: disable ceph mon service
service:
@ -309,6 +372,7 @@
image: "{{ ceph_restapi_docker_username }}/{{ ceph_restapi_docker_imagename }}:{{ ceph_restapi_docker_image_tag }}"
name: "{{ ansible_hostname }}-ceph-restapi"
state: absent
ignore_errors: true
- name: remove ceph mon service
file:
@ -331,6 +395,7 @@
osd_group_name: osds
mds_group_name: mdss
rgw_group_name: rgws
rbdmirror_group_name: rbd_mirrors
nfs_group_name: nfss
hosts:
@ -338,6 +403,7 @@
- "{{ osd_group_name }}"
- "{{ mds_group_name }}"
- "{{ rgw_group_name }}"
- "{{ rbdmirror_group_name }}"
- "{{ nfs_group_name }}"
become: true
@ -499,6 +565,7 @@
osd_group_name: osds
mds_group_name: mdss
rgw_group_name: rgws
rbdmirror_group_name: rbd_mirrors
nfs_group_name: nfss
hosts:
@ -506,6 +573,7 @@
- "{{ osd_group_name }}"
- "{{ mds_group_name }}"
- "{{ rgw_group_name }}"
- "{{ rbdmirror_group_name }}"
- "{{ nfs_group_name }}"
gather_facts: false # Already gathered previously
@ -533,6 +601,21 @@
tasks:
- include_vars: roles/ceph-common/defaults/main.yml
- include_vars: group_vars/all
ignore_errors: true
- include_vars: group_vars/mdss
ignore_errors: true
- include_vars: group_vars/rgws
ignore_errors: true
- include_vars: group_vars/rbd-mirrors
ignore_errors: true
- include_vars: group_vars/nfss
ignore_errors: true
- include_vars: group_vars/osds
ignore_errors: true
- include_vars: group_vars/mons
ignore_errors: true
- include_vars: group_vars/restapis
ignore_errors: true
- name: purge fetch directory for localhost
file: