From a535e65a85aa99af2e42a22a891de79a172bd033 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Fri, 21 Jun 2024 16:39:09 +0200 Subject: Fix prechecks for interfaces with dashes Closes-Bug: #2070051 Depends-On: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/923544 Change-Id: I221eb136e77c61aef39e8646b48b927352d1419d --- roles/cephadm/tasks/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/cephadm') diff --git a/roles/cephadm/tasks/main.yml b/roles/cephadm/tasks/main.yml index 7dcacd77b..63ba7b0e3 100644 --- a/roles/cephadm/tasks/main.yml +++ b/roles/cephadm/tasks/main.yml @@ -33,7 +33,7 @@ - name: Bootstrap cephadm vars: - mon_ip: "{{ hostvars[inventory_hostname]['ansible_' + api_interface_name].ipv4.address }}" + mon_ip: "{{ hostvars[inventory_hostname]['ansible_' + api_interface_name | replace('-','_')].ipv4.address }}" command: cmd: > cephadm @@ -80,7 +80,7 @@ ceph_conf_fixed: | [global] fsid = {{ ceph_fsid }} - mon_host = {% for host in groups['all'] %} {{ hostvars[host]['ansible_' + api_interface_name].ipv4.address }} {% if not loop.last %},{% endif %} {% endfor %} + mon_host = {% for host in groups['all'] %} {{ hostvars[host]['ansible_' + api_interface_name | replace('-','_')].ipv4.address }} {% if not loop.last %},{% endif %} {% endfor %} copy: content: "{{ ceph_conf_fixed }}" dest: "/etc/ceph/ceph.conf.fixed" -- cgit v1.2.3