diff --git a/awx_collection/plugins/modules/tower_credential.py b/awx_collection/plugins/modules/tower_credential.py index 13cec021ac..a3609b818d 100644 --- a/awx_collection/plugins/modules/tower_credential.py +++ b/awx_collection/plugins/modules/tower_credential.py @@ -411,7 +411,7 @@ def main(): credential = module.copy_item( credential, copy_from, name, endpoint='credentials', item_type='credential', - copy_lookup_data=copy_lookup_data + copy_lookup_data=copy_lookup_data, ) if state == 'absent': diff --git a/awx_collection/plugins/modules/tower_inventory.py b/awx_collection/plugins/modules/tower_inventory.py index 30e77e4195..1ec8c5d271 100644 --- a/awx_collection/plugins/modules/tower_inventory.py +++ b/awx_collection/plugins/modules/tower_inventory.py @@ -139,6 +139,7 @@ def main(): inventory = module.copy_item( inventory, copy_from, name, endpoint='inventories', item_type='inventory', + copy_lookup_data={}, ) if state == 'absent': diff --git a/awx_collection/plugins/modules/tower_job_template.py b/awx_collection/plugins/modules/tower_job_template.py index d38ef0f5a9..094de9127b 100644 --- a/awx_collection/plugins/modules/tower_job_template.py +++ b/awx_collection/plugins/modules/tower_job_template.py @@ -449,6 +449,7 @@ def main(): existing_item = module.copy_item( existing_item, copy_from, name, endpoint='job_templates', item_type='job_template', + copy_lookup_data={}, ) if state == 'absent': diff --git a/awx_collection/plugins/modules/tower_notification_template.py b/awx_collection/plugins/modules/tower_notification_template.py index 912b06bcdd..26f41787e8 100644 --- a/awx_collection/plugins/modules/tower_notification_template.py +++ b/awx_collection/plugins/modules/tower_notification_template.py @@ -408,6 +408,7 @@ def main(): existing_item = module.copy_item( existing_item, copy_from, name, endpoint='notification_templates', item_type='notification_template', + copy_lookup_data={}, ) if state == 'absent': diff --git a/awx_collection/plugins/modules/tower_project.py b/awx_collection/plugins/modules/tower_project.py index a10beaab27..408aa203e9 100644 --- a/awx_collection/plugins/modules/tower_project.py +++ b/awx_collection/plugins/modules/tower_project.py @@ -300,6 +300,7 @@ def main(): project = module.copy_item( project, copy_from, name, endpoint='projects', item_type='project', + copy_lookup_data={}, ) if state == 'absent': diff --git a/awx_collection/plugins/modules/tower_workflow_job_template.py b/awx_collection/plugins/modules/tower_workflow_job_template.py index 7828e55f09..6faa4c1353 100644 --- a/awx_collection/plugins/modules/tower_workflow_job_template.py +++ b/awx_collection/plugins/modules/tower_workflow_job_template.py @@ -242,6 +242,7 @@ def main(): existing_item = module.copy_item( existing_item, copy_from, name, endpoint='workflow_job_templates', item_type='workflow_job_template', + copy_lookup_data={}, ) if state == 'absent': diff --git a/awx_collection/tests/integration/targets/tower_job_launch/tasks/main.yml b/awx_collection/tests/integration/targets/tower_job_launch/tasks/main.yml index 440f98ee2e..e789a2bc7b 100644 --- a/awx_collection/tests/integration/targets/tower_job_launch/tasks/main.yml +++ b/awx_collection/tests/integration/targets/tower_job_launch/tasks/main.yml @@ -164,16 +164,16 @@ that: - "result is changed" -- name: Get the job - tower_job_list: - query: {"id": "{{result.id}}"} - register: result - - name: Wait for 2nd job max 120s tower_job_wait: job_id: "{{result.id}}" timeout: 120 +- name: Get the job + tower_job_list: + query: {"id": "{{result.id}}"} + register: result + - assert: that: - '{"foo": "bar"} | to_json in result.results[0].extra_vars'