mirror of https://github.com/ceph/ceph-ansible.git
purge-cluster: remove usage of `with_fileglob`
`with_fileglob` loops over files on the machine where ansible-playbook is being run. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/2185/head
parent
387fd49086
commit
947766e294
|
@ -661,12 +661,18 @@
|
||||||
register: check_for_running_ceph
|
register: check_for_running_ceph
|
||||||
failed_when: check_for_running_ceph.rc == 0
|
failed_when: check_for_running_ceph.rc == 0
|
||||||
|
|
||||||
|
- name: find ceph systemd unit files to remove
|
||||||
|
find:
|
||||||
|
paths: "/etc/systemd/system"
|
||||||
|
pattern: "ceph*"
|
||||||
|
register: systemd_files
|
||||||
|
|
||||||
- name: remove ceph systemd unit files
|
- name: remove ceph systemd unit files
|
||||||
file:
|
file:
|
||||||
path: "{{ item }}"
|
path: "{{ item.path }}"
|
||||||
state: absent
|
state: absent
|
||||||
with_fileglob: /etc/systemd/system/ceph*
|
with_items:
|
||||||
changed_when: false
|
- "{{ systemd_files.files }}"
|
||||||
when: ansible_service_mgr == 'systemd'
|
when: ansible_service_mgr == 'systemd'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue