Hi all,
i'm making a manifest for an agent on windows.
I have to make some actions ONLY if a file already exists.
I tried in this way, but it seems dowsn't work..
class sql2008{
package { sql2008:
ensure => present,
}
exec {'check_dotnet':
command => 'IF EXIST c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll (echo 1) ELSE (echo 0)',
returns => $check_dotnet_exist
}
notice(" __ $check_dotnet_exist __ ")
}
When i call the agent, the notice message is "__ __"
How can i save the output of the exec in a variable?
Ty all,
Giovanni