mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
make sure group_names is always sorted
this makes it consistent with previous ansilbe versions and other paths that create the group_names variable
This commit is contained in:
@@ -362,7 +362,7 @@ class VariableManager:
|
||||
variables['playbook_dir'] = loader.get_basedir()
|
||||
|
||||
if host:
|
||||
variables['group_names'] = [group.name for group in host.get_groups() if group.name != 'all']
|
||||
variables['group_names'] = sorted([group.name for group in host.get_groups() if group.name != 'all'])
|
||||
|
||||
if self._inventory is not None:
|
||||
variables['groups'] = dict()
|
||||
|
||||
Reference in New Issue
Block a user