Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression introduced in b77abd0491 causing bug in inventory modu… #73429

Merged
merged 2 commits into from Feb 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,4 @@
bugfixes:
- inventory plugins - Let plugins define the sanitization method for the constructed ``groups`` feature.
minor_changes:
- constructed inventory plugin - Sanitize group names created from the ``groups`` option silently.
2 changes: 1 addition & 1 deletion lib/ansible/plugins/inventory/__init__.py
Expand Up @@ -389,7 +389,7 @@ def _add_host_to_composed_groups(self, groups, variables, host, strict=False):
self.templar.available_variables = variables
for group_name in groups:
conditional = "{%% if %s %%} True {%% else %%} False {%% endif %%}" % groups[group_name]
group_name = original_safe(group_name, force=True)
group_name = self._sanitize_group_name(group_name)
try:
result = boolean(self.templar.template(conditional))
except Exception as e:
Expand Down