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

Changing check for all in awx.awx.export #13854

Merged

Conversation

john-westcott-iv
Copy link
Member

SUMMARY

Fixes #13853

The fields used to be strings but at some point converted to arrays. The check for == 'all' never matched == ['all'] so exporting everything of a type would never work.

To test, run a playbook like:

---
- name: Export the inventory
  hosts: localhost
  connection: local
  gather_facts: False
  tasks:
    - awx.awx.export:
        inventory: ['something', 'all']
        controller_host: https://localhost:8043
        controller_username: admin
        controller_password: admin
        validate_certs: False
      register: inventory

    - debug:
        var: inventory

The exported inventories would be [] (because it was looking for an inventory named all). After the fix the exported inventories should match your instance.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
COMPONENT NAME
  • Collection
AWX VERSION

ADDITIONAL INFORMATION

@github-actions github-actions bot added the component:awx_collection issues related to the collection for controlling AWX label Apr 13, 2023
Copy link
Member

@TheRealHaoLiu TheRealHaoLiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and verified that 'all' now works

Copy link
Contributor

@sean-m-sullivan sean-m-sullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, this works

@john-westcott-iv john-westcott-iv self-assigned this Apr 14, 2023
@jay-steurer jay-steurer self-requested a review April 17, 2023 11:12
@jay-steurer jay-steurer merged commit 32f7dfe into ansible:devel Apr 18, 2023
15 checks passed
AlanCoding pushed a commit to AlanCoding/awx that referenced this pull request Aug 10, 2023
Co-authored-by: John Westcott IV <32551173+john-westcott-iv@users.noreply.github.com>
kdelee pushed a commit to kdelee/awx that referenced this pull request May 8, 2024
Co-authored-by: John Westcott IV <32551173+john-westcott-iv@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:awx_collection issues related to the collection for controlling AWX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug Report: awx.awx.export all does not work.
4 participants