Skip to content

Ansible - Callback

Configs

Example of config from ansible.cfg file:

[defaults]
stdout_callback = unixy
[defaults]
callback_whitelist = profile_tasks

DIY Module

Example of config:

[defaults]
stdout_callback = community.general.diy
bin_ansible_callbacks = True

[callback_diy]
on_any_msg = "{{ ansible_callback_diy.result.output.stdout }}"

Note

Before use this plugin you must install the ansible community.general collection:

ansible-galaxy collection install community.general
  • https://www.middlewareinventory.com/blog/ansible-ad-hoc-commands/
Back to top