mirror of https://github.com/ceph/ceph-ansible.git
osd: fix monitor_name error when scaling out OSDs
This commit fixes a bug when trying to scale out osd nodes with `crush_rule_config` is enabled. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1822599 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/5264/head
parent
38ce02c2ea
commit
4bcc52cb2a
|
@ -26,7 +26,12 @@
|
|||
|
||||
- name: set_fact monitor_name ansible_hostname
|
||||
set_fact:
|
||||
monitor_name: "{{ ansible_hostname }}"
|
||||
monitor_name: "{{ hostvars[item]['ansible_hostname'] }}"
|
||||
delegate_to: "{{ item }}"
|
||||
delegate_facts: true
|
||||
with_items: "{{ groups.get(mon_group_name, []) }}"
|
||||
run_once: true
|
||||
when: groups.get(mon_group_name, []) | length > 0
|
||||
|
||||
- name: find a running monitor
|
||||
when: groups.get(mon_group_name, []) | length > 0
|
||||
|
|
Loading…
Reference in New Issue