ignore errors true does not work as expected

0 votes

I'm trying to create a playbook such that it ignores all the errors while execution but the execution does not succeed towards the end if errors are encountered.

How do I go about this?

Jan 8, 2019 in Ansible by Ali
• 11,330 points

1 answer to this question.

0 votes

Hey @Ali, 

  • You can use the flag ignore_errors and set it to true for every task. 
  • Set another flag which is set to false if there are any errors encountered while the execution
  • At the end of playbook check if your flag is true or false. Perform a task which decides the execution result based on the flag result. 

answered Jan 8, 2019 by Lisa

Related Questions In Ansible

0 votes
1 answer

Playbook executed fine but output not as expected

Hey @Nisha, you've mentioned this line on ...READ MORE

answered Feb 7, 2019 in Ansible by Pragya
0 votes
1 answer
+15 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,450 points
+2 votes
1 answer
0 votes
2 answers

ansible-command not found

Use some other variable instead of PATH. READ MORE

answered Apr 23, 2019 in Ansible by Vismaya
+1 vote
1 answer