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
52 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
377 views
0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
211 views
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
61 views