In cfengine, I have a variable that is set to the output of a command. Let say variable myoutput is set to "hi world". How can I execute a command based on the contents of myoutput.
I would like to do something like this (sudo cfengine code):
bundle agent test
{
vars:
"myoutput" string => execresult("echo 'hi world';","noshell");
commands:
myoutput=="hi world"::
"/usr/bin/php myaction.php";
}