What is Puppet equivalent of the 'ignore_failure' in Chef or the 'ignore_errors' in Ansible?

0 votes

I have the following piece of manifest on Puppet Master :

exec { 'DatabaseCreation':
command => '/usr/bin/mysqladmin  -u root --password="system" create gitHandson'}

When I ran puppet agent --test on Puppet Agent, an error:

Notice: /Stage[main]/Deployment/Exec[DatabaseCreation]/returns: /usr/bin/mysqladmin: CREATE DATABASE failed; error: 'Can't create database 'gitHandson'; database exists'Error: /usr/bin/mysqladmin  -u root --password="system" create gitHandson returned 1 instead of one of [0]

How do i ignore it?

Jul 16, 2018 in Ansible by Nilesh
• 6,900 points
159 views

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

There’s no need to ignore the error or the failures, there are better ways of dealing with this.

There’s no mechanism which ignores errors in puppet.

Easiest solution is to just add a &&true to the end of your command, so it will return 0 and not fail.

answered Jul 17, 2018 by shelly

Related Questions In Ansible

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

What are the different types of plugins available in Ansible?

Ansible provides a huge variety of plugins ...READ MORE

answered Feb 19 in Ansible by Priya
45 views
+1 vote
1 answer

Is it possible to append a large amount of text to a file using Ansible?

Here is concept which you can follow. blockinfile is ...READ MORE

answered Jul 30, 2018 in Ansible by Atul
• 10,190 points
1,394 views

© 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.