fix non skipped task for ansible v1.9.x

please refer to
https://bugzilla.redhat.com/show_bug.cgi?id=1376283

Signed-off-by: Sébastien Han <seb@redhat.com>
pull/994/head
Sébastien Han 2016-10-03 16:48:04 +02:00
parent d7699672a8
commit f162db1202
2 changed files with 4 additions and 4 deletions

View File

@ -63,7 +63,7 @@
msg: "ceph-disk failed to create an OSD"
when:
" 'ceph-disk: Error: ceph osd create failed' in item.get('stderr', '') "
with_items: "{{ combined_activate_osd_disk_results.results }}"
with_items: "{{ (combined_activate_osd_disk_results|default({})).results|default([]) }}"
# NOTE (leseb): this task is for partitions because we don't explicitly use a partition.
- name: activate osd(s) when device is a partition
@ -113,7 +113,7 @@
command: systemctl enable ceph-osd@{{ item }}
changed_when: false
failed_when: false
with_items: "{{ osd_id.stdout_lines }}"
with_items: "{{ (osd_id|default({})).stdout_lines|default([]) }}"
when:
- use_systemd
- is_after_hammer
@ -123,7 +123,7 @@
name: ceph-osd@{{ item }}
state: started
enabled: yes
with_items: "{{ osd_id.stdout_lines }}"
with_items: "{{ (osd_id|default({})).stdout_lines|default([]) }}"
changed_when: false
when:
- use_systemd

View File

@ -22,7 +22,7 @@
- name: check the partition status of the journal devices
shell: "parted --script {{ item }} print > /dev/null 2>&1"
with_items: "{{ raw_journal_devices }}"
with_items: "{{ raw_journal_devices|default([])|unique }}"
changed_when: false
failed_when: false
register: journal_partition_status