Hi Josh,

Thank you for your reply, but this is not a problem with either the 
backslashes (btw, I am using doubles because of the example here: 
http://docs.puppetlabs.com/windows/writing.html#packagepackage), neither 
with the *install_options* array - both versions install the check_mk exe 
successfully.

When I have

    install_options => ['/S', '/D=C:\<myfolder>\check_mk'],

check_mk is successfully installed but the files inside *C:\<myfolder>\check_mk 
*(check_mk installation dir) although readable I can not exec them;

When I have 

    install_options => ['/S', '/D=C:\check_mk'],

check_mk is also successfully installed and I can exec the files  inside 
*C:\check_mk  
*(check_mk installation dir).


I think I found the problem, this puppet installation was updated from 
3.3.2, where it was still acceptable to set permissions on Windows files, I 
just added 

   if $osfamily == 'windows' {
     File { source_permissions => ignore }
   }

to my sites.pp, then deleted *C:\<myfolder>\* and re-ran puppet agent, now 
the file permissions are as supposed - I had already tried to delete this 
folder, but without ignoring the source_permissions windows wide, and  
although the exec files that were fetched from the master could be ran the 
ones created by the check_mk installer were not.



On Friday, February 28, 2014 2:51:21 PM UTC, Josh Cooper wrote:
>
> Hi Armindo,
>
>
> On Fri, Feb 28, 2014 at 5:23 AM, Armindo Silva 
> <[email protected]<javascript:>
> > wrote:
>
>> Hi,
>>
>> I have the following class for installing check_mk on windows machines:
>>
>> class windows_check_mk {
>>
>>   require windows_common
>>
>>    package{ 'Check_MKAgent 1.2.4':
>>     ensure          => installed,
>>     source          => 'c:\\<my folder>\\installers\\check-mk-agent.exe',
>>
>
> Per the puppet language docs, a double backslash in a single quoted string 
> is supposed to be a literal backslash[1]. But puppet actually interprets 
> that as a double backslash due to a long standing bug[2]. You'll want to 
> use single backslashes, or switch to double quotes.
>
>     install_options => ['/S', '/D=C:\<myfolder>\check_mk'],
>>
>
> I was going to point you to our windows package documentation[3], but I 
> see that it too needs updating. If you want to specify key/value pairs, 
> then you will want to do:
>
>     ['/S', { '/D' => 'C:\<myfolder\check_mk' }]
>
> Note puppet will automatically quote the path if it contains spaces.
>
>   }
>>
>> }
>>
>>
>> The windows_common take cares of creating the folder c:\<my folder>\ and 
>> fetching several subfolders there - including subfolder installers.
>>
>> This class successfully installs check_mk agent inside  
>> C:\<myfolder>\check_mk but none of the files inside can be exec by any 
>> user, if I change install_options to 
>>
>> ['/S', '/D=C:\\check_mk'],
>>
>> this does not happen and all exes can be executed. 
>>
>
>> Why does this happens? Is there a way to workaround it?
>>
>> I am using puppet 3.4.3 either on master and on the clients.
>>
>> Thank you.
>>
>>  -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/86c664eb-4eae-4098-98e6-eeb1a4c272fe%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
> Josh
>
> [1] 
> http://docs.puppetlabs.com/puppet/latest/reference/lang_datatypes.html#single-quoted-strings
> [2] https://projects.puppetlabs.com/issues/16246
> [3] http://docs.puppetlabs.com/windows/writing.html#packagepackage
> -- 
> Josh Cooper
> Developer, Puppet Labs
>
> *Join us at PuppetConf 2014, September 23-24 in San Francisco* -* 
> http://bit.ly/pupconf14 
> <http://bit.ly/pupconf14>*
> Register now and save $350!
>  

-- 
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/390f678f-21de-470c-a779-2b7687d780e6%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to