mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-11 03:31:29 -07:00
Fine tune sanity (#53544)
* modify regex to use implicit charsets this should solve issues in py3 and unicode names * fix issue with subgroups in yaml inventory * clarify deprecation message * separated per name warning from deprecation * move noise to verbosity, simplify warnings * fix docs to reflect actual 'good' practice * change toggle to choice list to give users more options
This commit is contained in:
parent
86ba4f3e46
commit
9b67219096
5 changed files with 40 additions and 22 deletions
|
@ -153,7 +153,7 @@ class InventoryModule(BaseFileInventoryPlugin):
|
|||
self.inventory.set_variable(group, var, group_data[key][var])
|
||||
elif key == 'children':
|
||||
for subgroup in group_data[key]:
|
||||
self._parse_group(subgroup, group_data[key][subgroup])
|
||||
subgroup = self._parse_group(subgroup, group_data[key][subgroup])
|
||||
self.inventory.add_child(group, subgroup)
|
||||
|
||||
elif key == 'hosts':
|
||||
|
@ -166,6 +166,8 @@ class InventoryModule(BaseFileInventoryPlugin):
|
|||
else:
|
||||
self.display.warning("Skipping '%s' as this is not a valid group definition" % group)
|
||||
|
||||
return group
|
||||
|
||||
def _parse_host(self, host_pattern):
|
||||
'''
|
||||
Each host key can be a pattern, try to process it and add variables as needed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue