The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #5668

puppet resource exits with 0 despite failing to do as commanded

Added by Anonymous almost 5 years ago. Updated almost 4 years ago.

Status:AcceptedStart date:12/24/2010
Priority:NormalDue date:
Assignee:-% Done:


Target version:3.x
Affected Puppet version:development Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


The following ‘puppet resource’ invocation improperly returns 0 in my testing:

] puppet resource host test target=/tmp/whatever; echo $?
notice: /Host[test]/ensure: created
err: /Host[test]: Could not evaluate: ip is a required attribute for hosts
host { 'test':
    ensure => 'present',
    target => '/tmp/hosts-1744'

It does correctly report that there is a required attribute missing (ip), but the exit code is zero.

The usual behavior of a tool like this would be to exit with an error code indicating that something did not work, so that it could be driven by other automation solutions.


#1 Updated by James Turnbull almost 5 years ago

  • Status changed from Unreviewed to Accepted

#2 Updated by Nigel Kersten almost 4 years ago

  • Target version set to 3.x

Also available in: Atom PDF