From de0122d64ea569bf4aca1992cbc629ebd2319618 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Sat, 18 Apr 2020 19:32:18 -0400 Subject: [PATCH] Respect the ec2 script nested groups option --- awx/main/models/inventory.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index e47b21b001..3308c84b8b 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -2038,6 +2038,10 @@ class ec2(PluginFileInjector): # Using the plugin, but still want dashes whitelisted ret['use_contrib_script_compatible_sanitization'] = True + if source_vars.get('nested_groups') is False: + for this_keyed_group in keyed_groups: + this_keyed_group.pop('parent_group', None) + if keyed_groups: ret['keyed_groups'] = keyed_groups