Hello,
is there any way to suppress some part of the log which is printing on console while Ansible playbook execution.I want to fetch only the output returned from the script.
I do not prefer to see the following output on the console.
PLAY [Apply the following configuration on all hosts] *************************
GATHERING FACTS ***************************************************************
ok: [172.19.7.113]
TASK: [Execute] ***************************************************************
changed: [172.19.7.113]
TASK: [shell echo ‘“{{ansible_default_ipv4.address}} {{user.stdout_lines}}”’ >> /home/ansi.log] ***
changed: [172.19.7.113 → 127.0.0.1]
TASK: [debug ] ****************************************************************
ok: [172.19.7.113] => {
“msg”: “172.19.7.113 [‘root’]”
}
PLAY RECAP ********************************************************************
172.19.7.113 : ok=4 changed=2 unreachable=0 failed=0
Is there any other alternative apart from setting no_log: true for every task??
May be going ahead I would want to see the logs of the task for which the status is changed and ignore the “ok” tasks.
Thanks in advance,
Mona G