Skip to content

Commit

Permalink
Fix Ansible inventory generation when reusing group names
Browse files Browse the repository at this point in the history
When a kolla-ansible group is composed of a kayobe group with the same
name and of at least one other kayobe group, kayobe would generate an
invalid Ansible inventory such as:

[compute:children]
controllers
compute

Because the top-level group should already be defined, we only need to
add as children the kayobe groups using different names.

Change-Id: I88bdf1e3d0c08271ac8938ae2f9ac3f9fee1efa5
Story: 2009927
Task: 44798
  • Loading branch information
priteau committed Apr 7, 2022
1 parent 60d74df commit 0c190a2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ansible_python_interpreter={{ kolla_ansible_target_venv }}/bin/python
# Mapping from kolla-ansible group {{ kolla_group }} to top level kayobe
# groups.
[{{ kolla_group }}:children]
{% for group in kolla_group_config.groups %}
{% for group in renamed_groups %}
{{ group }}
{% endfor %}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixes Ansible inventory generation with some custom group mappings using
the same group names for Kayobe and Kolla Ansible. See `story 2009927
<https://storyboard.openstack.org/#!/story/2009927>`__ for details.

0 comments on commit 0c190a2

Please sign in to comment.