File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1+ [defaults]
2+ # Use the YAML stdout callback plugin.
3+ stdout_callback = yaml
4+ # Use the stdout_callback when running ad-hoc commands.
5+ bin_ansible_callbacks = True
6+ # Disable fact variable injection to improve performance.
7+ inject_facts_as_vars = False
8+
9+ [ssh_connection]
10+ pipelining = True
Original file line number Diff line number Diff line change @@ -103,8 +103,8 @@ Example playbook (used with OpenStack Kayobe)
103103 roles:
104104 - role: stackhpc.hashicorp.vault
105105 consul_bind_interface: "{{ internal_net_interface }}"
106- consul_bind_ip: "{{ internal_net_ips[ansible_hostname ] }}"
107- vault_bind_address: "{{ external_net_ips[ansible_hostname ] }}"
106+ consul_bind_ip: "{{ internal_net_ips[inventory_hostname ] }}"
107+ vault_bind_address: "{{ external_net_ips[inventory_hostname ] }}"
108108 vault_api_addr: "https://{{ external_net_fqdn }}:8200"
109109 vault_config_dir: "/opt/kayobe/vault"
110110```
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ vault_config: >
4848 }
4949
5050consul_bind_interface : " "
51- consul_bind_ip : " {{ hostvars[inventory_hostname]['ansible_'~ consul_bind_interface].ipv4.address }}"
51+ consul_bind_ip : " {{ hostvars[inventory_hostname].ansible_facts[ consul_bind_interface].ipv4.address }}"
5252
5353# Docker options
5454vault_container : {}
Original file line number Diff line number Diff line change 1414 CONSUL_CLIENT_INTERFACE : " {{ consul_bind_interface }}"
1515 command : >
1616 consul agent
17- -bind "{{ hostvars[inventory_hostname]['ansible_'~ consul_bind_interface].ipv4.address }}"
17+ -bind "{{ hostvars[inventory_hostname].ansible_facts[ consul_bind_interface].ipv4.address }}"
1818 -data-dir /consul/data
1919 -server
2020 -bootstrap-expect "{{ ansible_play_hosts | length }}"
2121 {% for host in ansible_play_hosts %}
2222 {% if host != inventory_hostname %}
23- -retry-join "{{ hostvars[host]['ansible_'~ consul_bind_interface].ipv4.address }}"
23+ -retry-join "{{ hostvars[host].ansible_facts[ consul_bind_interface].ipv4.address }}"
2424 {% endif %}
2525 {% endfor %}
2626 become : True
You can’t perform that action at this time.
0 commit comments