On Mon, Nov 8, 2010 at 8:29 AM, Patrick <kc7...@gmail.com> wrote:

>
> On Nov 8, 2010, at 8:03 AM, R.I.Pienaar wrote:
>
> >
> > ----- "Markus Falb" <markus.f...@fasel.at> wrote:
> >
> >> Hi,
> >>
> >> I try to serve a file
> >>
> >> file { "/root/test3.txt":
> >>        ensure => file,
> >>        source => "puppet:///yum/test.txt",
> >> }
> >>
> >> On the puppetmaster this files look like this
> >>
> >> #$ ls -n test.txt
> >> -rw-r--r--  1 502  301  4  8 Nov 16:25 test.txt
> >>
> >> Finally, here is my question: What ownership may I expect on the
> >> resulting file ?
> >
> > Do not rely on this behavior, specify the owner and mode in your file{}
> resources.
> >
> > That is the only reliable way.
>
> To expand on this, one way you can rely on a default is to set the default
> by putting this in site.pp (Not in any class)
>
> File {
>        mode => '644',
>        owner => '502',
>        group => '301,
> }
>
>
This would generally be a bad idea IMHO. If you put a File{} in site.pp, it
stops you from being able to put a File{} anywhere else, say in a module. If
you _do_ put a File{} in a module (which I do all the time), it disregards
the global File{} in site.pp. Same applies to any resource default.

That's unless of course puppet has a plusignment operator for resource types
that I wasn't aware of.

Doug.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to