Hi Jeff,

  Thanks for you input and clearing up the directory permissions
query.
  I'll scurry off and investigate the links you've provided.

Thanks,
Brett

On Aug 3, 6:28 am, Jeff McCune <[email protected]> wrote:
> On Mon, Aug 2, 2010 at 4:53 AM, ScubaDude <[email protected]> wrote:
> > Hi,
>
> >  I'm a puppet newbie so I don't know what the best approach is.
> >  I'm trying to write a recipe for apache, there are multiple hosts
> > each with different configurations in the environment so I was
> > thinking of using $hostname and having each hosts config files in a
> > seperate directory and using the recurse option to get all of the
> > files.
>
> You may want to have a look at the apache modules posted 
> tohttp://forge.puppetlabs.com/for inspiration as well.
>
> The general pattern for this type of thing is to use a defined
> resource type and encapsulate the configuration of each vhost.  e.g.
> define apache::vhost ($port, $fqdn) { }  You could start by using a
> file resource in the defined type to manage the virtual host's
> configuration file in the conf.d directory.
>
> >  What I'm not sure about is how to set the correct ownership and
> > permissions on the files.
> >  I think by default all the apache config files are owned by root
> > with 644 permissions?
>
> It may vary by distribution, but owner => root, group => apache with
> mode => 0640 is quite sensible.
>
> >  If I add mode => 644, what will happen to sub directories?
>
> When you do recurse => true, puppet will automatically set the execute
> bit if you've declared the readable bit to be set.  Your files will be
> 0644 and your directories will be 0755 if the mode attribute takes on
> the value 0644 and recurse takes on the value true.
>
> --
> Jeff McCunehttp://www.puppetlabs.com/

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

Reply via email to