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

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users/fbca5067-3eaf-46ed-8890-3e317a0a1b32%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to