mirror of https://github.com/ceph/ceph-ansible.git
cephadm: use public_network when adding hosts
When adding host, using ansible_facts['default_ipv4']['address'] might not be the desired network, we shouldn't enforce the subnet with the default route. Let's use the public_network instead. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2006415 Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>pull/6983/head
parent
9aa9b4dda2
commit
2f34531304
|
@ -296,7 +296,7 @@
|
|||
when: is_hci | bool
|
||||
|
||||
- name: manage nodes with cephadm
|
||||
command: "{{ ceph_cmd }} orch host add {{ ansible_facts['nodename'] }} {{ ansible_facts['default_ipv4']['address'] }} {{ group_names | join(' ') }}"
|
||||
command: "{{ ceph_cmd }} orch host add {{ ansible_facts['nodename'] }} {{ ansible_facts['all_ipv4_addresses'] | ips_in_ranges(public_network.split(',')) }} {{ group_names | join(' ') }}"
|
||||
changed_when: false
|
||||
delegate_to: '{{ groups[mon_group_name][0] }}'
|
||||
|
||||
|
|
Loading…
Reference in New Issue