purge-docker-cluster: add support for mgr/mon collocation

Recently we introduced the collocation of mon and mgr by default, so we
don't need to have an explicit mgrs section for this. This means we have
to remove the mgr container on the mon machines too.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 325a159415)

# Conflicts:
#	infrastructure-playbooks/purge-docker-cluster.yml
pull/3484/head
Sébastien Han 2018-12-03 22:46:52 +01:00
parent 8ce8d580a4
commit 782959f094
1 changed files with 20 additions and 6 deletions

View File

@ -519,20 +519,28 @@
tasks:
- name: disable ceph mon service
# since mgr are now collocated with mons by default
- name: disable ceph mon and mgr service
service:
name: "ceph-mon@{{ ansible_hostname }}"
name: "{{ item }}"
state: stopped
enabled: no
ignore_errors: true
with_items:
- "ceph-mgr@{{ ansible_hostname }}"
- "ceph-mon@{{ ansible_hostname }}"
- name: remove ceph mon container
- name: remove ceph mon and mgr container
docker_container:
image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
name: "ceph-mon-{{ ansible_hostname }}"
name: "{{ item }}"
state: absent
ignore_errors: true
with_items:
- "ceph-mon-{{ ansible_hostname }}"
- "ceph-mgr-{{ ansible_hostname }}"
<<<<<<< HEAD
- name: remove restapi container
docker_container:
image: "{{ ceph_docker_registry }}/{{ ceph_docker_image }}:{{ ceph_docker_image_tag }}"
@ -541,11 +549,17 @@
ignore_errors: true
- name: remove ceph mon service
=======
- name: remove ceph mon and mgr service
>>>>>>> 325a1594... purge-docker-cluster: add support for mgr/mon collocation
file:
path: /etc/systemd/system/ceph-mon@.service
path: "/etc/systemd/system/ceph-{{ item }}@.service"
state: absent
with_items:
- mon
- mgr
- name: remove ceph mon image
- name: remove ceph mon and mgr image
docker_image:
state: absent
repository: "{{ ceph_docker_registry }}"