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

Develop a new way of returning Ansible version and collections data #1273

Open
AlanCoding opened this issue Jul 18, 2023 · 0 comments
Open
Labels
needs_triage New item that needs to be triaged

Comments

@AlanCoding
Copy link
Member

AlanCoding commented Jul 18, 2023

We need an updated alternative for getting the data which was previously produced in the entrypoint here:

if output=$(ansible-galaxy collection list --format json 2> /dev/null); then
echo $output > ${AWX_ISOLATED_DATA_DIR}/collections.json
fi
ansible --version 2> /dev/null | head -n 1 > ${AWX_ISOLATED_DATA_DIR}/ansible_version.txt

that included files

  • collections.json
  • ansible_version.txt

which were produced by the obvious commands. This data was consumed by AWX, saved to the database, and passed along to analytics.


Implementation details are TBD, of course. However, I would suggest that we could reasonably pass this data in the status_callback for the starting status, and it is fully expected that this would have to be intentionally enabled by the caller (just as the AWX_ISOLATED_DATA_DIR env var was abused before), so whatever instructions for adding this data will then subsequently be added by AWX.

To clarify (about the format of delivery) - we don't need a file named collections.json. We just need the data somewhere and instructions so that we can collect it in AWX. This is why I propose the status_handler, as that could be passed in a dictionary that is already being passed from the worker to the processor, and AWX could just read that inside of an existing callback method.

@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_triage New item that needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant