]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch: make osd collection idempotent 1873/head
authorSébastien Han <seb@redhat.com>
Fri, 8 Sep 2017 09:30:45 +0000 (11:30 +0200)
committerSébastien Han <seb@redhat.com>
Fri, 8 Sep 2017 09:31:47 +0000 (11:31 +0200)
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 <seb@redhat.com>
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index bac7da470a8f4e52b28330b5ae8223a74299b2b3..c6a1c6d213b88a15ebc4c613e21c1f4542c835f0 100644 (file)
         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: |
         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