What are callback plugins and how do you use them?
AdvancedConceptVault, Privilege Escalation and Error Handling
Answer
Callback plugins receive events during a run (task start, result, play recap) and either change the output (stdout callbacks) or do something extra (notification callbacks). Common ones: ansible.posix.profile_tasks (per-task timings), ansible.posix.timer, ansible.posix.json, and custom Slack or logging callbacks.
[defaults]
stdout_callback = ansible.builtin.default
callbacks_enabled = ansible.posix.profile_tasks, ansible.posix.timer
[callback_default]
result_format = yaml
Exactly one stdout callback is active. profile_tasks is the first thing we enable when a playbook is slow, since it ranks the slowest tasks.
More on Vault, Privilege Escalation and Error Handling
What is Ansible Vault?BeginnerWhich `ansible-vault` commands do you use day to day?BeginnerHow do you supply the vault password when running a playbook?BeginnerWhat is `encrypt_string` and when is it better than encrypting a whole file?IntermediateWhat are vault IDs and why use them?AdvancedHow is Vault data encrypted and what does the file look like?Advanced