Open tan-wei-xin-alez opened 1 year ago
Files identified in the description:
If these files are incorrect, please update the component name
section of the description or use the !component
bot command.
cc @theque5t click here for bot help
ansible.posix.debug is a stdout callback, same as community.general.diy, so only one of the two can be active (https://docs.ansible.com/ansible/latest/plugins/callback.html#setting-a-callback-plugin-for-ansible-playbook). ansible.posix.profile_tasks is an aggregate callback, so it can work together with stdout callbacks.
ansible.posix.debug is a stdout callback, same as community.general.diy, so only one of the two can be active (https://docs.ansible.com/ansible/latest/plugins/callback.html#setting-a-callback-plugin-for-ansible-playbook). ansible.posix.profile_tasks is an aggregate callback, so it can work together with stdout callbacks.
ah that explains it, where is this documented? As in, is there a list of which callbacks are aggregate and which are not?
Is it also possible to implement ansible.posix.debug as an aggregate callback? I figured out how to replace the default callback with ansible.posix.debug at https://github.com/ansible-collections/community.general/blob/main/plugins/callback/diy.py#L795 but that's obviously a hacky way of doing it
As in, is there a list of which callbacks are aggregate and which are not?
I don't think there is. At least for the two plugins (debug and profile_tasks), the ansible-doc CLI utility will show that information (ansible-doc -t callback debug
and ansible-doc -t callback profile_tasks
have a TYPE
entry). The HTML docsite (https://docs.ansible.com/ansible/devel/collections/ansible/posix/debug_callback.html, https://docs.ansible.com/ansible/devel/collections/ansible/posix/profile_tasks_callback.html) does not show that yet.
Is it also possible to implement ansible.posix.debug as an aggregate callback?
I never used the debug callback and have no idea what it does, so I cannot really answer that.
Summary
As mentioned in the title, when setting
stdout_callback=community.general.diy
in ansible.cfg, some callbacks can be enabled while others can't (e.g.callbacks_enabled=profile_tasks
works but notcallbacks_enabled=debug
)Issue Type
Bug Report
Component Name
community.general.diy
Ansible Version
Community.general Version
OS / Environment
Steps to Reproduce
The following ansible.cfg
behaves as expected with the following playbook.yml
and install_apt_pkg.yml
giving the expected output (truncated)
On the other hand, the following ansible.cfg
does not behave as expected as seen in the following output (truncated)
Expected Results
They should work together or some sort of error should be thrown indicating that the callbacks are incompatible, otherwise the only way to figure out is via trial and error
Code of Conduct