mirror of
https://github.com/ansible/awx.git
synced 2026-02-20 04:30:05 -03:30
Continue work on collection ci (#16071)
* Fix some patterns in collection test playbooks * Revert change to ansible.builtin.user * Revert change to WFJT for dup label error * Add error handling and fix references * Add back lookup organization * Fix all remainingfailing syntax in workflow_job_template * Allow creating galaxy credential types without an organization (#16077) * remove requirement for galaxy credentials to belong to an organization * remove organization check for galaxy credential type --------- Co-authored-by: AlanCoding <arominge@redhat.com> Co-authored-by: Peter Braun <pbraun@redhat.com>
This commit is contained in:
@@ -344,7 +344,10 @@ def main():
|
||||
|
||||
unified_job_template = module.params.get('unified_job_template')
|
||||
if unified_job_template:
|
||||
new_fields['unified_job_template'] = module.get_one('unified_job_templates', name_or_id=unified_job_template, **{'data': search_fields})['id']
|
||||
ujt = module.get_one('unified_job_templates', name_or_id=unified_job_template, **{'data': search_fields})
|
||||
if ujt is None or 'id' not in ujt:
|
||||
module.fail_json(msg=f'Could not get unified_job_template name_or_id={unified_job_template} search_fields={search_fields}, got {ujt}')
|
||||
new_fields['unified_job_template'] = ujt['id']
|
||||
inventory = module.params.get('inventory')
|
||||
if inventory:
|
||||
new_fields['inventory'] = module.resolve_name_to_id('inventories', inventory)
|
||||
|
||||
Reference in New Issue
Block a user