diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index ba33bb8a1..8c5d3de89 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -363,13 +363,13 @@ command: "{{ ceph_cmd }} orch host add {{ ansible_facts['nodename'] }} {{ ansible_facts['all_ipv4_addresses'] | ips_in_ranges(cephadm_mgmt_network.split(',')) | first }} {{ group_names | intersect(adopt_label_group_names) | join(' ') }}" changed_when: false delegate_to: '{{ groups[mon_group_name][0] }}' - when: cephadm_mgmt_network is ansible.utils.ipv4 + when: cephadm_mgmt_network.split(',')[0] is ansible.utils.ipv4 - name: manage nodes with cephadm - ipv6 command: "{{ ceph_cmd }} orch host add {{ ansible_facts['nodename'] }} {{ ansible_facts['all_ipv6_addresses'] | ips_in_ranges(cephadm_mgmt_network.split(',')) | last | ansible.utils.ipwrap }} {{ group_names | intersect(adopt_label_group_names) | join(' ') }}" changed_when: false delegate_to: '{{ groups[mon_group_name][0] }}' - when: cephadm_mgmt_network is ansible.utils.ipv6 + when: cephadm_mgmt_network.split(',')[0] is ansible.utils.ipv6 - name: add ceph label for core component command: "{{ ceph_cmd }} orch host label add {{ ansible_facts['nodename'] }} ceph"