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
• 7,060 points
2,935 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
8,007 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
• 52,350 points
1,925 views
0 votes
0 answers

what is the difference between tags and delegate_to in ansible?

Sep 23, 2019 in Ansible by Rajendra
• 510 points

closed Sep 24, 2019 by Kalgi 823 views
0 votes
1 answer

What is the ask_pass module in Ansible?

Hi@akhtar, Ask_pass is the control module in an ...READ MORE

answered Aug 11, 2020 in Ansible by MD
• 95,460 points
3,065 views
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,041 views
+2 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
1,008 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
14,679 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP