Merge pull request #6609 from beeankha/wfjt_module_inventory_fix

Resolve Name to ID Properly in WFJT Module

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-04-06 23:42:34 +00:00 committed by GitHub
commit 0b433ebb1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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:

View File

@ -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