Add a custom callback plugin for managing logs
Compare changes
geant/gap_ansible/playbooks/callback_plugins
0 → 120000
+ 1
− 0
To be tested in our collection.
Changes to ansible.cfg:
[defaults]
stdout_callback = filtering_syslog
callback_plugins = ./callback_plugins << Not sure.
How to use it in plays: By default you have no output, if you need the task to be printed add tag [print_action]. Example:
---
- name: A verbose playbook
hosts: localhost
connection: local
gather_facts: false
tasks:
- name: Print something on screen
debug:
msg: "First something"
- name: Print something on screen again
debug:
msg: "Second something"
- name: Print something on screen and again
debug:
msg:
"Third something very long
with multiline
in it
"
tags: [print_action]
- name: Print something on screen again again
debug:
msg: "5th something"