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

No ability to specify null values for source_project (ansible.controller.inventory_source) #14921

Open
5 of 11 tasks
kk-at-redhat opened this issue Feb 25, 2024 · 0 comments
Open
5 of 11 tasks
Labels
community component:awx_collection issues related to the collection for controlling AWX needs_triage type:bug

Comments

@kk-at-redhat
Copy link

kk-at-redhat commented Feb 25, 2024

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 security@ansible.com instead.)

Bug Summary

Depending on the source, source_project value is either defined or null. However, there is no way to specify null value source_project in a playbook. A workaround would be to have a different playbook for each source type (project, Satellite etc.) which is not scalable.

AWX version

23.2.0

Select the relevant components

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

Installation method

docker development environment

Modifications

no

Ansible version

2.14.2

Operating system

Red Hat Enterprise Linux release 9.1 (Plow)

Web browser

Chrome

Steps to reproduce

- ansible.controller.inventory_source:
    name: "Sat"
    inventory: "Dynamic A"
    source_project: ""

- ansible.controller.inventory_source:
    name: "Sat"
    inventory: "Dynamic A"
    source_project: None

Expected results

ok: [localhost] ...

ok: [localhost] ...

Actual results

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Request to /api/v2/projects/ returned 6 items, expected 1"

fatal: [localhost]: FAILED! => {"changed": false, "msg": "The specified source project, {}, was not found."}

Additional information

No response

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 needs_triage type:bug
Projects
None yet
Development

No branches or pull requests

1 participant