update to allow use of id for unified job template

This commit is contained in:
sean-m-ssullivan
2021-10-04 18:52:50 -04:00
parent 07f193d8d6
commit a28c023cf1
3 changed files with 7 additions and 12 deletions

View File

@@ -310,9 +310,7 @@ def main():
unified_job_template = module.params.get('unified_job_template')
if unified_job_template:
search_fields['name'] = unified_job_template
new_fields['unified_job_template'] = module.get_one('unified_job_templates', **{'data': search_fields})['id']
new_fields['unified_job_template'] = module.get_one('unified_job_templates', name_or_id=unified_job_template, **{'data': search_fields})['id']
inventory = module.params.get('inventory')
if inventory:
new_fields['inventory'] = module.resolve_name_to_id('inventories', inventory)