Skip to content
Snippets Groups Projects
Commit a27e0740 authored by Mark Goddard's avatar Mark Goddard
Browse files

Pass though host variables from kayobe to kolla-ansible inventory

By default this includes:

* ansible_host
* ansible_port
* ansible_ssh_private_key_file
parent c576e4d4
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,13 @@ kolla_overcloud_inventory_top_level_group_map: {} ...@@ -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. # have no hosts mapped to them will be provided with an empty group definition.
kolla_overcloud_inventory_kolla_top_level_groups: [] 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. # Kolla-ansible global configuration options.
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# These hostnames must be resolvable from your deployment host # These hostnames must be resolvable from your deployment host
{% for host in groups[group] %} {% for host in groups[group] %}
{% set host_hv=hostvars[host] %} {% 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 %} {% endfor %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment