Can someone please explain the logic here?

The Puppet documentation says the following:

If this parameter is set, then this exec will 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 [email protected].
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.

Reply via email to