From fdacac9fa0266208dcce62a00f713b60d8b54676 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Fri, 8 Sep 2017 11:30:45 +0200 Subject: [PATCH] switch: make osd collection idempotent MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- ...h-from-non-containerized-to-containerized-ceph-daemons.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5