Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflow_job_template: not accepting empty value for inventory #15846

Open
5 of 11 tasks
kk-at-redhat opened this issue Feb 19, 2025 · 1 comment
Open
5 of 11 tasks

workflow_job_template: not accepting empty value for inventory #15846

kk-at-redhat opened this issue Feb 19, 2025 · 1 comment
Labels
community component:awx_collection issues related to the collection for controlling AWX type:bug

Comments

@kk-at-redhat
Copy link

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to [email protected] instead.)

Bug Summary

which would be required to remove the setting

AWX version

4.6.7

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

docker development environment

Modifications

no

Ansible version

2.15.13

Operating system

RHEL9

Web browser

No response

Steps to reproduce

ansible -m ansible.controller.workflow_job_template -a '{"name": "Workflow B", "workflow_nodes": [{"identifier": "1ca40111-f92b-435e-bff2-b33edd455941", "unified_job_template": {"name": "Template C", "type": "job_template"}, "inventory": "Dynamic C"}]}' localhost

localhost | CHANGED => {
"changed": true,
"id": 18,
"node_creation_data": [
.....

ansible -m ansible.controller.workflow_job_template -a '{"name": "Workflow B", "workflow_nodes": [{"identifier": "1ca40111-f92b-435e-bff2-b33edd455941", "unified_job_template": {"name": "Template C", "type": "job_template"}, "inventory": ""}]}' localhost

Expected results

localhost | CHANGED => {
"changed": true,
"id": 18,
"node_creation_data": [
.....

Actual results

localhost | FAILED! => {
"changed": false,
"msg": "Request to /api/v2/inventories/ returned 11 items, expected 1",
"query": null,
.....

Additional information

No response

@PabloHiro
Copy link
Contributor

Valid issue, thank you! Indeed, creating a workflow_job_template through the API does not require an inventory, so the collection should not require one either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community component:awx_collection issues related to the collection for controlling AWX type:bug
Projects
None yet
Development

No branches or pull requests

2 participants