Callback Plugins Flashcards
List the type of callback plugins in ansible
- Stdout
- notification
- Aggregate
What is callback plugin?
plugins that can perform custom actions in response to Ansible events. Example of actions: a play starting, a task completing, etc.
What is the role of stdout plugins?
Control the format of output displayed on terminals
Can Ansible support multiple stdout plugins?
yes. However, only one stdout plugin can be active at a time.
How do specify the active stdout plugin?
Use the stdout_callback key in default section of ansible.cfg
What are examples of stdout callback plugins?
- actionable
- debug
- default
- dense
- json
- minimal
- oneline
- selective
- skippy
What is the actionalble stdout plugin?
A stdout callback plugin that shows output only if the task changes the state of the managed node or fails. This makes output less noisy.
What is the debug stdout plugin?
A stdout callback plugin that makes it easier to read stdout and strderr returned by tasks.
What is the dense stdout plugin?
A stdout callback plugin that always show only two lines of output. It overwrites the existing two lines instead of scrolling.
What is the json stdout plugin?
A stdout callback plugin that generates machine-readable json output. This plugin does not generate output until the entire playbook has finished executing.
What is the minimal stdout plugin?
A stdout callback plugin that does very little processing of the event returned by the task.
What is the online stdout plugin?
Similar to minimal plugin but print everything on one line
What is the selective stdout plugin?
A stdout callback plugin that shows output only for 1) failed tasks and 2) successful tags that have the clause print_action
What is the skippy stdout plugin?
A stdout callback plugin that doe snot show any output for hosts that are skipped.
what are example of actions performed by plugins other than the stdout callback plugin?
- record execution time
- send slack notification
- send email