From 325a159415a0eb8699a45c04b2d8ea233b2157c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 3 Dec 2018 22:46:52 +0100 Subject: [PATCH] purge-docker-cluster: add support for mgr/mon collocation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../purge-docker-cluster.yml | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/infrastructure-playbooks/purge-docker-cluster.yml b/infrastructure-playbooks/purge-docker-cluster.yml index 000b5e505..75832e34f 100644 --- a/infrastructure-playbooks/purge-docker-cluster.yml +++ b/infrastructure-playbooks/purge-docker-cluster.yml @@ -519,26 +519,36 @@ 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 }}" - - name: remove ceph mon service + - name: remove ceph mon and mgr service 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 }}"