From f44465384b168fc2e1f5694a7e9689f062c66209 Mon Sep 17 00:00:00 2001 From: Stuart Cornell Date: Tue, 27 Jun 2023 15:25:14 +0000 Subject: [PATCH] fix for case when interface nmes vary --- roles/cephadm/templates/cluster.yml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/cephadm/templates/cluster.yml.j2 b/roles/cephadm/templates/cluster.yml.j2 index a28bc4b..c09599d 100644 --- a/roles/cephadm/templates/cluster.yml.j2 +++ b/roles/cephadm/templates/cluster.yml.j2 @@ -3,7 +3,7 @@ service_type: host hostname: {{ hostvars[host].ansible_facts.hostname }} {% set cephadm_admin_interface = hostvars[host]['cephadm_admin_interface'] %} -addr: {{ hostvars[host]['ansible_facts'][cephadm_admin_interface]['ipv4']['address'] }} +addr: {{ hostvars[host]['ansible_all_ipv4_addresses'] | ipaddr( cephadm_public_network ) | first }} labels: {% if host in groups['mons'] %} - _admin