purge-cluster: Do not fail on systemd commands

The systemd can't stop services if the unit files were removed before
the cluster was purged. We should just ignore these.

Signed-off-by: Boris Ranto <branto@redhat.com>
pull/2013/head
Boris Ranto 2017-10-06 22:52:53 +02:00
parent 1121a840ef
commit f696cb7637
1 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,7 @@
name: ceph-mds@{{ ansible_hostname }} name: ceph-mds@{{ ansible_hostname }}
state: stopped state: stopped
enabled: no enabled: no
failed_when: false
when: ansible_service_mgr == 'systemd' when: ansible_service_mgr == 'systemd'
- name: stop ceph mdss - name: stop ceph mdss
@ -97,6 +98,7 @@
name: ceph-mgr@{{ ansible_hostname}} name: ceph-mgr@{{ ansible_hostname}}
state: stopped state: stopped
enabled: no enabled: no
failed_when: false
when: ansible_service_mgr == 'systemd' when: ansible_service_mgr == 'systemd'
- name: purge ceph rgw cluster - name: purge ceph rgw cluster
@ -118,6 +120,7 @@
name: ceph-radosgw@rgw.{{ ansible_hostname }} name: ceph-radosgw@rgw.{{ ansible_hostname }}
state: stopped state: stopped
enabled: no enabled: no
failed_when: false
when: ansible_service_mgr == 'systemd' when: ansible_service_mgr == 'systemd'
- name: stop ceph rgws - name: stop ceph rgws
@ -148,6 +151,7 @@
service: service:
name: ceph-rbd-mirror@admin.service name: ceph-rbd-mirror@admin.service
state: stopped state: stopped
failed_when: false
when: ansible_service_mgr == 'systemd' when: ansible_service_mgr == 'systemd'
- name: stop ceph rbd mirror on ubuntu - name: stop ceph rbd mirror on ubuntu
@ -174,6 +178,7 @@
service: service:
name: nfs-ganesha name: nfs-ganesha
state: stopped state: stopped
failed_when: false
when: ansible_service_mgr == 'systemd' when: ansible_service_mgr == 'systemd'
- name: stop ceph nfss - name: stop ceph nfss
@ -478,6 +483,7 @@
name: ceph-mon@{{ ansible_hostname }} name: ceph-mon@{{ ansible_hostname }}
state: stopped state: stopped
enabled: no enabled: no
failed_when: false
when: ansible_service_mgr == 'systemd' when: ansible_service_mgr == 'systemd'
- name: stop ceph mons - name: stop ceph mons