From 13e8b60cd3dbbc4b5c928cc20edb99b99a323923 Mon Sep 17 00:00:00 2001 From: Teoman ONAY Date: Wed, 16 Aug 2023 16:02:29 +0200 Subject: [PATCH] cephadm-adopt: Fixes hosts addition to be managed by cephadm The tasks "manage nodes with cephadm - ipv4/6" are skipped when cephadm_mgmt_network contains more than one ip network which prevent cephadm from managing the host. Signed-off-by: Teoman ONAY (cherry picked from commit db2f3e42dc23d72cfae85ec942b6b2f43e482e81) --- infrastructure-playbooks/cephadm-adopt.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure-playbooks/cephadm-adopt.yml b/infrastructure-playbooks/cephadm-adopt.yml index a448ce174..818777b14 100644 --- a/infrastructure-playbooks/cephadm-adopt.yml +++ b/infrastructure-playbooks/cephadm-adopt.yml @@ -372,13 +372,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" -- 2.39.5