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

Evaluating variables inside onlyif close

$
0
0
Hi, I have a variable that i set at a very early stage, the variable is boolean, then at some point i want to exec a command based on the fact if this variable is true or false, something like this :> exec { 'update-to-latest-core': command => "do something", user => 'root', refreshonly => true, path => [ "/bin/bash", "sbin/" , "/usr/bin/", "/usr/sbin/" ], onlyif => ['test ${latest} = true'], notify => Exec["update-to-latest-database"], } So this command doesn't work (onlyif => ['test ${latest} = true'],) I tried several other ways too , but didn't work . Something so simple cannot be so hard to do , Can someone help me with this , and also explain the rules behind getting commands to execute inside onlyif close. (also i cannot use if-close on a higher level because I have other dependencies )

Viewing all articles
Browse latest Browse all 6104

Trending Articles



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