ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.89k stars 3.4k forks source link

workflow_job_template import fails when schema inventory is null #13973

Open amattson98 opened 1 year ago

amattson98 commented 1 year ago

Please confirm the following

Bug Summary

I am using the workflow_job_template module to import several (often older) exported workflow json files, which often have the line 'inventory: null' listed under individual job template nodes. In these cases, due to changes in #13595, the module throws python errors due to the 'inventory' objects not being iterable.

Because we are using the workflow json files directly, it would be preferable to have this module ignore null values for node inventories, like it did previously.

As a note, there might be a similar issue for the 'execution_environment' field, but we haven't confirmed.

AWX version

21.14.0

Select the relevant components

Installation method

N/A

Modifications

no

Ansible version

2.13.6

Operating system

RHEL 8.6 (Automation Controller)

Web browser

Chrome

Steps to reproduce

Using an instance of Ansible Automation Controller, create a playbook using the 'workflow_job_template' module. It should draw field information (specifically the 'inventory' field) from a json file, which provides '"inventory": null' for the inventory value. Preferably this should use an existing import playbook, and simply use an updated workflow json source file.

Expected results

Workflow is able to import successfully.

Actual results

When executing the playbook, it should fail at the python interpreter. The thrown error indicates that an object of type 'NoneType' is not iterable.

Additional information

No response

sean-m-sullivan commented 1 year ago

can you supply the actual inputs you are using so we can see it, Also where are you generating it from, that it comes out as null, so we can track back the problem on both ends