mirror of https://github.com/ceph/ceph-ansible.git
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>pull/3437/head
parent
2bcc00896f
commit
325a159415
|
@ -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 }}"
|
||||
|
|
Loading…
Reference in New Issue