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,880 points
306 views

1 answer to this question.

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

what is the difference between tags and delegate_to in ansible?

Hey @Rajendra, If you wish to perform ...READ MORE

answered Sep 24 in Ansible by Kalgi
• 42,410 points
84 views
0 votes
0 answers

what is the difference between tags and delegate_to in ansible?

Sep 23 in Ansible by Rajendra
• 450 points

closed Sep 24 by Kalgi 38 views
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
214 views
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
70 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,240 points
3,014 views