Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all articles
Browse latest Browse all 6104

RPM install and action on failure with exec

$
0
0
Friends: I have a package resource that gets executed. It is an RPM and has post-install scripts that get run. In some case the RPM;s post-install script fails. This is being handled by the package resource in that it fails as well. I however want to trap that always call an Exec resource that will do additional checks so we can remove the RPM. package { 'mypackage': ensure => installed, } exec { '/path/to/myscript': onlyif => ..., require => Package['mypackage'], } I want the Exec resource to get called always, whether the package resource got run with success or not. Any idea how to get this accomplished ? It is my understanding that if the package resource fails, the Exec resource does not get called. Should I use the *notify attribute* on the package resource instead ? Thank You for your time and attention. Regards, -Narahari

Viewing all articles
Browse latest Browse all 6104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>