Skip to content

Commit

Permalink
Merge pull request #64 from stackhpc/dashes_workaround
Browse files Browse the repository at this point in the history
Add support for interfaces with dashes
  • Loading branch information
markgoddard authored Jul 5, 2024
2 parents 339863d + 7843453 commit 103edc2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ skip_list:
- meta-runtime[unsupported-version]
- fqcn[action-core]
- fqcn[action]
- meta-no-info
7 changes: 6 additions & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions roles/vault/tasks/consul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 103edc2

Please sign in to comment.