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 in Ansible by Ali
• 10,290 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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 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 in Ansible by Pragya
+13 votes
2 answers
0 votes
1 answer
0 votes
2 answers

ansible-command not found

Use some other variable instead of PATH. READ MORE

answered Apr 23 in Ansible by Vismaya
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.