exec will run unless the command returns 0Can someone please explain the logic here?The Puppet documentation says the following:If this parameter is set, then thisexecwill run unless the command returns 0
So in the following if Windows Feature is installed, PS returns 1, meaning it will execute, correct?exec{'Install-Application-Server':command => 'import-module servermanager; Add-WindowsFeature Application-Server -Restart',unless => 'if ((get-windowsfeature -name Application-Server).Installed) { exit 1 }',provider => powershell,}
Is this a Windows related anomaly or am I missing something?
--Thanks.
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/1ef6179e-aa68-4ad5-b8ce-04d80dd29321%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Join us at PuppetConf 2014, September 23-24 in San Francisco