]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Merge pull request #749 from SamYaple/unified_when
authorLeseb <seb@redhat.com>
Mon, 9 May 2016 16:25:37 +0000 (18:25 +0200)
committerLeseb <seb@redhat.com>
Mon, 9 May 2016 16:25:37 +0000 (18:25 +0200)
Unify formatting of when conditional

1  2 
roles/ceph-osd/tasks/check_devices.yml

index a11b4b0ec77993db5a163c15a7a20a1b0f11048e,34dcfd5fd0e7634541187ef8452c96e9c0d9e6c8..97df24da47727955d3bdbfdad062eac0ca12f62d
      - devices
    changed_when: false
    when:
-     (journal_collocation or raw_multi_journal) and not
-     osd_auto_discovery and
-     item.0.rc != 0
+     - journal_collocation or raw_multi_journal
+     - not osd_auto_discovery
+     item.0.rc != 0
  
  - name: fix partitions gpt header or labels of the osd disks (autodiscover disks)
 -  shell: sgdisk --zap-all --clear --mbrtogpt -g -- "/dev/{{ item.1.key }}"
 +  shell: "sgdisk --zap-all --clear --mbrtogpt -g -- '/dev/{{ item.1.key }}' || sgdisk --zap-all --clear --mbrtogpt -g -- '/dev/{{ item.1.key }}'"
    with_together:
      - combined_osd_partition_status_results.results
      - ansible_devices
    changed_when: false
    when:
-     journal_collocation and
-     osd_auto_discovery and
-     ansible_devices is defined and
-     item.value.removable == "0" and
-     item.value.partitions|count == 0 and
-     item.0.rc != 0
+     - journal_collocation
+     - osd_auto_discovery
+     - ansible_devices is defined
+     - item.value.removable == "0"
+     - item.value.partitions|count == 0
+     item.0.rc != 0
  
  - name: fix partitions gpt header or labels of the journal devices
 -  shell: sgdisk --zap-all --clear --mbrtogpt -g -- {{ item.1 }}
 +  shell: "sgdisk --zap-all --clear --mbrtogpt -g -- {{ item.1 }} || shell: sgdisk --zap-all --clear --mbrtogpt -g -- {{ item.1 }}"
    with_together:
      - journal_partition_status.results
      - raw_journal_devices