File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
ansible/roles/baremetal/tasks Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 28
28
marker : " # {mark} ANSIBLE GENERATED HOSTS"
29
29
block : |
30
30
{% for host in groups['baremetal'] %}
31
- {% set api_interface = hostvars[host]['api_interface'] %}
31
+ {% set api_interface = hostvars[host]['api_interface'] | replace('-', '_') %}
32
32
{% if host not in groups['bifrost'] or 'ansible_' + api_interface in hostvars[host] %}
33
33
{% set hostnames = [hostvars[host]['ansible_nodename'], hostvars[host]['ansible_hostname']] %}
34
34
{{ 'api' | kolla_address(host) }} {{ hostnames | unique | join(' ') }}
39
39
- customize_etc_hosts | bool
40
40
# Skip hosts in the bifrost group that do not have a valid api_interface.
41
41
- inventory_hostname not in groups['bifrost'] or
42
- ' ansible_' + hostvars[inventory_hostname]['api_interface'] in hostvars[inventory_hostname]
42
+ ' ansible_' + hostvars[inventory_hostname]['api_interface'] | replace('-', '_') in hostvars[inventory_hostname]
43
43
44
44
# NOTE(osmanlicilegi): The distribution might come with cloud-init installed, and manage_etc_hosts
45
45
# configuration enabled. If so, it will override the file /etc/hosts from cloud-init templates at
Original file line number Diff line number Diff line change
1
+ ---
2
+ fixes :
3
+ - |
4
+ Fixes an issue when generating ``/etc/hosts`` during ``kolla-ansible
5
+ bootstrap-servers`` when one or more hosts has an ``api_interface`` with
6
+ dashes (``-``) in its name. `LP#1927357
7
+ <https://bugs.launchpad.net/kolla-ansible/+bug/1927357>`__
You can’t perform that action at this time.
0 commit comments