Ask Your Question

Puppet run exit status

asked 2013-10-02 17:40:45 -0500

svantil gravatar image

Am I missing something or on RedHat/CentOS linux after every Puppet run if it fails or not gives and exit status of 0? IS there a way around this? We want our AWS Cloud Formation templates to fail if a puppet run fails.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-02 19:36:54 -0500

Stefan gravatar image

If puppet is able to apply a catalog (e.g. no compile errors, no network failure, no invalid certificate) it will report an exitcode of zero, even if some resources failed. You can change this behaviour by running with --detailed-exit-code. From the manpage

Provide transaction information via exit codes. If this is enabled, an exit code of '2' means there were changes, an exit code of '4' means there were failures during the transaction, and an exit code of '6' means there were both changes and failures.

And there also is an accepted feature request about changing the exitcode if ... (more)

edit flag offensive delete link more


Thanks for the info. I was surprised that Puppet did not follow the standard. It will be nice when this feature request is in place. Chef has an advantage here.

svantil gravatar imagesvantil ( 2013-10-04 08:25:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-10-02 17:40:45 -0500

Seen: 1,889 times

Last updated: Oct 02 '13