I would like to display a debug message in my playbook like this :
[blablabla]
- debug:
msg:
- "######################################################################"
- " DIAGNOSTIC AGENT INSTALLATION "
- "######################################################################"
[blablabla]
When I run this playbook on multiple target , the debug message on console output is displayed as many times as hosts count (as intended).
TASK [sifac-sap-diagnosticagent : debug] *******
task path: /etc/ansible/test/roles/sifac-sap-diagnosticagent/tasks/main.yml:158
ok: [server1] => {
"msg": [
"######################################################################",
" DIAGNOSTIC AGENT INSTALLATION ",
"######################################################################"
]
}
ok: [server1] => {
"msg": [
"######################################################################",
" DIAGNOSTIC AGENT INSTALLATION ",
"######################################################################"
]
}
ok: [server1] => {
"msg": [
"######################################################################",
" DIAGNOSTIC AGENT INSTALLATION ",
"######################################################################"
]
}
ok: [server1] => {
"msg": [
"######################################################################",
" DIAGNOSTIC AGENT INSTALLATION ",
"######################################################################"
]
}
I would like to display this message only once, no matter hosts count. This in order to not overload my output.
Does option bypass_host_loop from debug ansible module do the job ?
Another method ?
https://docs.ansible.com/ansible/latest/collections/ansible/builtin/debug_module.html
thank you very much for your help
Regards