Skip to content

Commit 3094cfd

Browse files
committed
Simplify OSD add changed_when condition
1 parent 317fe17 commit 3094cfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/cephadm/tasks/osds.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
ceph orch daemon add osd {{ ansible_facts.hostname }}:{{ item }}
88
become: true
99
register: osd_add_result
10-
changed_when: osd_add_result.stdout != "Created no osd(s) on host " + ansible_facts.hostname + "; already created?"
10+
changed_when: not osd_add_result.stdout.startswith("Created no osd(s) on host")
1111
delegate_to: "{{ omit if 'mons' in group_names else groups['mons'][0] }}"
1212
when: cephadm_osd_devices | length > 0
1313
with_items: "{{ cephadm_osd_devices }}"

0 commit comments

Comments
 (0)