
Adds support for configuration of per-host network interfaces in Kolla Ansible. Previously, all interfaces were configured in globals.yml, meaning that all hosts used the same interface names. Now, interfaces are configured for each host via inventory files. This does have the drawback that host entries in the inventory are rather long and not too readable. An improvement on this could be to generate host_vars files. With a little more intelligence, it would be possible to use group_vars files or even globals.yml when interfaces are uniform within a group or globally. Change-Id: I95a128d762ff9faf70467f83cb276a5ab619d1ea Story: 2001658 Task: 6691
21 lines
690 B
Django/Jinja
21 lines
690 B
Django/Jinja
# Simple inventory for bootstrapping Kolla seed node.
|
|
[seed]
|
|
{% for seed in groups.get('seed', []) %}
|
|
{% set seed_hv=hostvars[seed] %}
|
|
{{ seed }}{% for hv_name in kolla_seed_inventory_pass_through_host_vars %}{% if hv_name in seed_hv %} {{ kolla_seed_inventory_pass_through_host_vars_map.get(hv_name, hv_name) }}='{{ seed_hv[hv_name] | to_json }}'{% endif %}{% endfor %}
|
|
|
|
{% endfor %}
|
|
|
|
[seed:vars]
|
|
ansible_user={{ kolla_ansible_user }}
|
|
{% if kolla_ansible_target_venv is not none %}
|
|
# Execute ansible modules on the remote target hosts using a virtualenv.
|
|
ansible_python_interpreter={{ kolla_ansible_target_venv }}/bin/python
|
|
{% endif %}
|
|
|
|
[baremetal:children]
|
|
seed
|
|
|
|
[bifrost:children]
|
|
seed
|