Add a custom callback plugin for managing logs
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"
Merge request reports
Activity
assigned to @Aleksandr.Kurbatov
added 86 commits
-
dbc6c610...987f9a27 - 82 commits from branch
develop
- e738cc56 - Add a custom callback plugin for managing logs
- e12b34d9 - Update `filtering_syslog` to use diff
- b9201c5a - Link to callback_plugins from the playbooks dir
- 2b09d888 - Update edge_port/tasks/deploy to use filter_syslog plugin
Toggle commit list-
dbc6c610...987f9a27 - 82 commits from branch
added 1 commit
- faac0025 - callback_plugin: difflib: ndiff -> context_diff
enabled an automatic merge when all merge checks for f17cb6a9 pass
mentioned in commit db86e21e
Please register or sign in to reply