Hi Armindo,

On Fri, Feb 28, 2014 at 5:23 AM, Armindo Silva <deathon2l...@gmail.com>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 puppet-users+unsubscr...@googlegroups.com.
> 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 puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CA%2Bu97unYT%3Djfsjc%2ByjbvnoKKE%3DNZz8c8_pC8%3D_OHqFY%2Bp-ME%2BQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to