From: Sébastien Han Date: Fri, 8 Sep 2017 09:30:45 +0000 (+0200) Subject: switch: make osd collection idempotent X-Git-Tag: v3.0.0rc7~7^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=fdacac9fa0266208dcce62a00f713b60d8b54676;p=ceph-ansible.git switch: make osd collection idempotent This commits allows us to run switch-from-non-containerized-to-containerized-ceph-daemons.yml multiple times. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1489353 Signed-off-by: Sébastien Han --- diff --git a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml index bac7da470..c6a1c6d21 100644 --- a/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml +++ b/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml @@ -199,6 +199,7 @@ systemctl list-units | grep "loaded active" | grep -Eo 'ceph-osd@[0-9]{1,2}.service' register: running_osds changed_when: false + failed_when: false - name: collect osd devices shell: | @@ -222,7 +223,8 @@ state: stopped enabled: no masked: yes - with_items: "{{ running_osds.stdout_lines }}" + with_items: "{{ running_osds.stdout_lines | default([])}}" + when: running_osds != [] - set_fact: ceph_uid: 64045