make sure group_names is always sorted

this makes it consistent with previous ansilbe versions and other
paths that create the group_names variable
pull/14798/head
Brian Coca 9 years ago
parent 27a33a6f18
commit d6546a7513

@ -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()

Loading…
Cancel
Save