Pass though host variables from kayobe to kolla-ansible inventory
By default this includes: * ansible_host * ansible_port * ansible_ssh_private_key_file
This commit is contained in:
parent
c576e4d486
commit
a27e0740fa
@ -56,6 +56,13 @@ kolla_overcloud_inventory_top_level_group_map: {}
|
||||
# have no hosts mapped to them will be provided with an empty group definition.
|
||||
kolla_overcloud_inventory_kolla_top_level_groups: []
|
||||
|
||||
# List of names of host variables to pass through from kayobe hosts to
|
||||
# kolla-ansible hosts, if set.
|
||||
kolla_overcloud_inventory_pass_through_host_vars:
|
||||
- "ansible_host"
|
||||
- "ansible_port"
|
||||
- "ansible_ssh_private_key_file"
|
||||
|
||||
###############################################################################
|
||||
# Kolla-ansible global configuration options.
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
# These hostnames must be resolvable from your deployment host
|
||||
{% for host in groups[group] %}
|
||||
{% set host_hv=hostvars[host] %}
|
||||
{{ host }}{% if "ansible_host" in host_hv %} ansible_host={{ host_hv["ansible_host"] }}{% endif %}
|
||||
{{ host }}{% for hv_name in kolla_overcloud_inventory_pass_through_host_vars %}{% if hv_name in host_hv %} {{ hv_name }}={{ host_hv[hv_name] }}{% endif %}{% endfor %}
|
||||
|
||||
{% endfor %}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user