Fix bug with keyed_group group name transformation (#53714)

pull/53802/head
Alan Rominger 6 years ago committed by Brian Coca
parent e280f2f7b0
commit db3a2686ed

@ -420,13 +420,13 @@ class Constructable(object):
for bare_name in new_raw_group_names: for bare_name in new_raw_group_names:
gname = self._sanitize_group_name('%s%s%s' % (prefix, sep, bare_name)) gname = self._sanitize_group_name('%s%s%s' % (prefix, sep, bare_name))
self.inventory.add_group(gname) result_gname = self.inventory.add_group(gname)
self.inventory.add_child(gname, host) self.inventory.add_child(result_gname, host)
if raw_parent_name: if raw_parent_name:
parent_name = self._sanitize_group_name(raw_parent_name) parent_name = self._sanitize_group_name(raw_parent_name)
self.inventory.add_group(parent_name) self.inventory.add_group(parent_name)
self.inventory.add_child(parent_name, gname) self.inventory.add_child(parent_name, result_gname)
else: else:
if strict: if strict:

Loading…
Cancel
Save