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

Service restart based on fact

$
0
0
Hi, any idea how I can trigger a service restart based on a fact without using the exec-resource? Following the mantra "*if you're using exec, you're doing something wrong.*" I wonder how to do that. ## Situation I have got a process that occasionally takes too much memory. The approved fix for this is to restart the involved service. ## Approach I plan to gather the memory-usage in a fact and based on the value to restart the service if necessary. Without writing something like: if $fact > { exec {'restart-service': command => 'systemctl restart ..... } } I wonder if I can take usage of the notify-attribute somehow... Any ideas?

Viewing all articles
Browse latest Browse all 6104

Trending Articles



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