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 )
↧