Skip to content

Commit 9de1cb9

Browse files
authored
Merge pull request #95 from stackhpc/fix-delegate-to
Fix cephadm OSD addition host delegation issues
2 parents 7e54210 + ac0002f commit 9de1cb9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

roles/cephadm/tasks/osds.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@
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 }}"
14+
vars:
15+
# NOTE: Without this, the delegate hosts's ansible_host variable will not
16+
# be respected.
17+
ansible_host: "{{ hostvars[inventory_hostname].ansible_host if 'mons' in group_names else hostvars[groups['mons'][0]].ansible_host }}"

0 commit comments

Comments
 (0)