Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/vault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Role variables
* Consul
* Optional
* `consul_bind_interface`: Which interface should be used for Consul (default: "lo")
* `consul_bind_port`: Which port should be used for Consul (default: "8500")
* `consul_docker_name`: Docker - under which name to run the Consul image (default: "consul")
* `consul_docker_image`: Docker image for Consul (default: "hashicorp/consul")
* `consul_docker_tag`: Docker image tag for Consul (default: "latest")
Expand Down
3 changes: 2 additions & 1 deletion roles/vault/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ vault_config: >
}],
"storage": {
"consul": {
"address": "127.0.0.1:8500",
"address": "127.0.0.1:{{ consul_bind_port }}",
"path": "vault/"
}
},
Expand All @@ -62,6 +62,7 @@ vault_config: >

consul_bind_interface: "lo"
consul_bind_ip: "{{ hostvars[inventory_hostname].ansible_facts[consul_bind_interface].ipv4.address }}"
consul_bind_port: "8500"

# Docker options
vault_container: {}
Expand Down
1 change: 1 addition & 0 deletions roles/vault/tasks/consul.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
-bind "{{ hostvars[inventory_hostname].ansible_facts[consul_bind_interface].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 %}
Expand Down