From 784345363dd32cc8800995693ba1cc22ea6aece0 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Fri, 21 Jun 2024 15:58:20 +0200 Subject: [PATCH] Add support for interfaces with dashes Bump version to 2.5.1 Similar to [1]. [1]: https://review.opendev.org/c/openstack/kolla-ansible/+/794857/1/ansible/roles/baremetal/tasks/pre-install.yml#31 --- .ansible-lint | 1 + galaxy.yml | 7 ++++++- roles/vault/tasks/consul.yml | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.ansible-lint b/.ansible-lint index a9ca13f..42f1bae 100644 --- a/.ansible-lint +++ b/.ansible-lint @@ -5,3 +5,4 @@ skip_list: - meta-runtime[unsupported-version] - fqcn[action-core] - fqcn[action] + - meta-no-info diff --git a/galaxy.yml b/galaxy.yml index 7d951c0..21b48e0 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -2,10 +2,15 @@ namespace: stackhpc name: hashicorp description: > Hashicorp Vault/Consul deployment and configuration -version: "2.5.0" +version: "2.5.1" readme: "README.md" authors: - "MichaƂ Nasiadka" + - "Mark Goddard" + - "Matt Anson" + - "Pierre Riteau" + - "Bartosz Bezak" + - "Kyle Dean" dependencies: "community.docker": "*" license: diff --git a/roles/vault/tasks/consul.yml b/roles/vault/tasks/consul.yml index 2dba8b1..c7efaba 100644 --- a/roles/vault/tasks/consul.yml +++ b/roles/vault/tasks/consul.yml @@ -14,14 +14,14 @@ CONSUL_CLIENT_INTERFACE: "{{ consul_bind_interface }}" command: > consul agent - -bind "{{ hostvars[inventory_hostname].ansible_facts[consul_bind_interface].ipv4.address }}" + -bind "{{ hostvars[inventory_hostname].ansible_facts[consul_bind_interface | replace('-','_')].ipv4.address }}" -data-dir /consul/data -server -http-port "{{ consul_bind_port }}" -bootstrap-expect "{{ ansible_play_hosts | length }}" {% for host in ansible_play_hosts %} {% if host != inventory_hostname %} - -retry-join "{{ hostvars[host].ansible_facts[consul_bind_interface].ipv4.address }}" + -retry-join "{{ hostvars[host].ansible_facts[consul_bind_interface | replace('-','_')].ipv4.address }}" {% endif %} {% endfor %} become: true