Get rid of fake error logs

0 votes
While executing ansible playbooks, sometimes a few shell commands give error message while in reality they got executed without any problem. How to get rid of these fake error logs?
Feb 7 in Ansible by Jeena
42 views

1 answer to this question.

0 votes

These two modules : failed_when and changed_when can help you. 

- shell: echo good | grep bad
  register: res
  failed_when: false
  changed_when: false
answered Feb 7 by Pragya

Related Questions In Ansible

0 votes
1 answer

How do I get a list of all Ansible variables?

Ansible by default gathers facts about machines ...READ MORE

answered Jan 30 in Ansible by Mahir
163 views
0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

How to get details of playbook executions

Run these commands to enable logging before ...READ MORE

answered Jan 21 in Ansible by Tanishq
43 views