I am trying to set up a Puppet exec
resource for a Windows Server based on a Facter variable. But, it looks like onlyif
accepts only command files and not an inline expression.
Could someone please help me set this expression in onlyif
(either as a conditional expression or as inline-dos command)
exec { 'C:\Users\validate.cmd validate':
onlyif => "$validate_enabled" == true, => This not recognized as command
provider => powershell,
}
Thanks in advance.