From 771b831da81b08d5348c59c56e0acec14f57cb7b Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 14 Mar 2023 14:17:45 -0400 Subject: [PATCH] Fail constructed inventory if ANY source is unparsed --- awx/main/models/inventory.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index 010cfaa342..c8f609b2ca 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -1643,8 +1643,9 @@ class constructed(PluginFileInjector): def build_env(self, *args, **kwargs): env = super().build_env(*args, **kwargs) - # Enable all types of inventory plugins so we pick up the script files from source inventories - del env['ANSIBLE_INVENTORY_ENABLED'] + # Enable script inventory plugin so we pick up the script files from source inventories + env['ANSIBLE_INVENTORY_ENABLED'] += ',script' + env['ANSIBLE_INVENTORY_ANY_UNPARSED_IS_FAILED'] = 'True' return env