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.
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?
If I add mode => 644, what will happen to sub directories?
class httpd {
package { httpd:
ensure => latest
}
configfile { "/etc/httpd/conf/":
source => [
"puppet://$server/modules/httpd/$hostname",
"puppet://$server/modules/httpd/default",
],
recurse => true,
require => package["httpd"]
}
group { apache: gid => 48 }
user { apache:
comment => "Apache",
uid => 48,
gid => 48,
home => "/var/www",
shell => "/dev/null"
}
service { httpd:
running => true,
subscribe => [
file["/etc/httpd/conf/httpd.conf"],
package["httpd"]
]
}
}
--
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.