diff --git a/awx_collection/plugins/modules/tower_workflow_job_template.py b/awx_collection/plugins/modules/tower_workflow_job_template.py index e1c1d56c78..43b31ad65e 100644 --- a/awx_collection/plugins/modules/tower_workflow_job_template.py +++ b/awx_collection/plugins/modules/tower_workflow_job_template.py @@ -192,7 +192,7 @@ def main(): inventory = module.params.get('inventory') if inventory: - new_fields['inventory'] = module.resolve_name_to_id('inventory', inventory) + new_fields['inventory'] = module.resolve_name_to_id('inventories', inventory) webhook_credential = module.params.get('webhook_credential') if webhook_credential: diff --git a/awx_collection/tests/integration/targets/tower_workflow_job_template/tasks/main.yml b/awx_collection/tests/integration/targets/tower_workflow_job_template/tasks/main.yml index 6ac1a84e51..8a7a180ff9 100644 --- a/awx_collection/tests/integration/targets/tower_workflow_job_template/tasks/main.yml +++ b/awx_collection/tests/integration/targets/tower_workflow_job_template/tasks/main.yml @@ -82,6 +82,7 @@ - name: Create a workflow job template tower_workflow_job_template: name: "{{ wfjt_name }}" + inventory: Demo Inventory extra_vars: {'foo': 'bar', 'another-foo': {'barz': 'bar2'}} register: result