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,920 points
351 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

What is the difference between the host file and an inventory file in ansible?

Actually both are same. hosts file is ...READ MORE

answered Feb 12, 2019 in Ansible by Amith
• 140 points
636 views
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, 2019 in Ansible by Kalgi
• 50,050 points
197 views
0 votes
0 answers

what is the difference between tags and delegate_to in ansible?

Sep 23, 2019 in Ansible by Rajendra
• 470 points

closed Sep 24, 2019 by Kalgi 53 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,400 points
298 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, 2019 in Ansible by Priya
82 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,250 points
3,591 views