Fix regression introduced in b77abd0491
causing bug in inventory modu… (#73429)
* Fix regression introduced in b77abd0491
causing bug in inventory modules which break functionality in user setting use_contrib_script_compatible_sanitization parameter.
* Add changelog
Co-authored-by: s-hertel <19572925+s-hertel@users.noreply.github.com>
This commit is contained in:
parent
7cef930aa4
commit
4315e18807
2 changed files with 5 additions and 1 deletions
|
@ -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.
|
|
@ -389,7 +389,7 @@ class Constructable(object):
|
|||
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:
|
||||
|
|
Loading…
Reference in a new issue