You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard out callback for this project is extremely old, and has not been updated to changes that Ansible content have been adoption elsewhere.
Proposal: Place the awx_display (and minimal) callback plugins in a collection. Enable use of this collection, as opposed to the callback plugin.
I previously made a small attempt to convert this into a collection at #409, but it's a project of significant scope and impact.
Python import hacks resolvable by module_utils
The callback receiver puts code in multiple modules, and it allows for this by modifying sys.path. (the mention of the awx/lib folder is out of date, was before the split from awx)
Many other projects are making heavy use of ansible-test checks. You can do unit and integration tests. Unit tests would probably be useful for this project.
Enabling the collection as opposed to the plugin
We use an environment variable to enable the standard out callback.
If this is maintained as a collection, we would change this to modify ANSIBLE_COLLECTIONS_PATH instead. That option has some risk that custom collection paths in the user's ansible.cfg could get overwritten. This is an additional challenge, which would be resolved by parsing the config file, or by placing the collection in a special place in execution environment images.
The text was updated successfully, but these errors were encountered:
We add the callback dir to the PYTHONPATH in the ansible subprocess. Only if it's not containerized. That sounds like it is based on incorrect assumptions (it may not be necessary right now), but it's obviously not good.
The standard out callback for this project is extremely old, and has not been updated to changes that Ansible content have been adoption elsewhere.
Proposal: Place the
awx_display
(and minimal) callback plugins in a collection. Enable use of this collection, as opposed to the callback plugin.I previously made a small attempt to convert this into a collection at #409, but it's a project of significant scope and impact.
Python import hacks resolvable by module_utils
The callback receiver puts code in multiple modules, and it allows for this by modifying
sys.path
. (the mention of the awx/lib folder is out of date, was before the split from awx)ansible-runner/ansible_runner/callbacks/awx_display.py
Lines 38 to 41 in dd5de99
Now, you can much more easily break your code into multiple modules by putting modules into module_utils inside of a collection.
This would also probably resolve the import issue addressed with the other hack for import order.
ansible-runner/ansible_runner/display_callback/minimal.py
Lines 27 to 29 in dd5de99
Testing the plugin via
ansible-test
Many other projects are making heavy use of
ansible-test
checks. You can do unit and integration tests. Unit tests would probably be useful for this project.Enabling the collection as opposed to the plugin
We use an environment variable to enable the standard out callback.
ansible-runner/ansible_runner/config/_base.py
Line 270 in 1a8c1c5
If this is maintained as a collection, we would change this to modify
ANSIBLE_COLLECTIONS_PATH
instead. That option has some risk that custom collection paths in the user'sansible.cfg
could get overwritten. This is an additional challenge, which would be resolved by parsing the config file, or by placing the collection in a special place in execution environment images.The text was updated successfully, but these errors were encountered: