From c7114b2571c898110400a97de66cdb25deac0e8b Mon Sep 17 00:00:00 2001 From: beeankha Date: Mon, 7 Sep 2020 11:43:44 -0400 Subject: [PATCH] Add specific lookup data to error message --- awx_collection/plugins/modules/tower_inventory_source.py | 2 +- awx_collection/plugins/modules/tower_inventory_source_update.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx_collection/plugins/modules/tower_inventory_source.py b/awx_collection/plugins/modules/tower_inventory_source.py index 0145671933..1714773b32 100644 --- a/awx_collection/plugins/modules/tower_inventory_source.py +++ b/awx_collection/plugins/modules/tower_inventory_source.py @@ -208,7 +208,7 @@ def main(): inventory_object = module.get_one('inventories', data=lookup_data) if not inventory_object: - module.fail_json(msg='The specified inventory was not found.') + module.fail_json(msg='The specified inventory, {0}, was not found.'.format(lookup_data)) inventory_source_object = module.get_one('inventory_sources', **{ 'data': { diff --git a/awx_collection/plugins/modules/tower_inventory_source_update.py b/awx_collection/plugins/modules/tower_inventory_source_update.py index abb55d1941..c4cb27be7c 100644 --- a/awx_collection/plugins/modules/tower_inventory_source_update.py +++ b/awx_collection/plugins/modules/tower_inventory_source_update.py @@ -113,7 +113,7 @@ def main(): inventory_object = module.get_one('inventories', data=lookup_data) if not inventory_object: - module.fail_json(msg='The specified inventory was not found.') + module.fail_json(msg='The specified inventory, {0}, was not found.'.format(lookup_data)) inventory_source_object = module.get_one('inventory_sources', **{ 'data': {