mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 14:05:59 -03:30
fix chicken egg issue with workflow nodes and inventory sources for parents that do not exist (#15982)
fix chicken egg issue with workflow nodes and inventory sources for parents that do not exist
This commit is contained in:
@@ -230,7 +230,11 @@ def main():
|
||||
inventory_object = module.get_one('inventories', name_or_id=inventory, data=lookup_data)
|
||||
|
||||
if not inventory_object:
|
||||
module.fail_json(msg='The specified inventory, {0}, was not found.'.format(lookup_data))
|
||||
# if the inventory does not exist, then it can't have sources.
|
||||
if state == 'absent':
|
||||
module.exit_json(**module.json_output)
|
||||
else:
|
||||
module.fail_json(msg='The specified inventory, {0}, was not found.'.format(lookup_data))
|
||||
|
||||
inventory_source_object = module.get_one(
|
||||
'inventory_sources',
|
||||
|
||||
Reference in New Issue
Block a user