Vasil Mikhalenya
2011-Nov-16 18:16 UTC
[Puppet Users] Group membership dublicated resources
Hi all, I have define vhost($vhost,$db){ .... user { "apache" : name => apache, groups => "$title" , require => User["$title"],}... } and in nodes.pp node ''myhost'' { wg::web::vhost { "foo": vhost => "vhost1", db => "db1" } wg::web::vhost { "bar": vhost => "vhost1", db => "db2" } } In case of 2 vhosts per node user apache in define is duplicated. How can I get apache to become a member of all users groups ( name passed via $title ) Thank you -- Best regards, Vasil Mikhalenya -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Which OS are you using? On mine the apache user gets created as soon as I install apache. So basically I have a class (not a define) named apache::install which installs the packet and rolls out a very basic httpd.conf. If there is no apache user created automatically on your system this would also be the place to create an apache user, outside of the define. All vhosts will run with the apache user anyways. Afaik there''s no way anyways to let one vhost be run by apachev1, and another one by apachev2. On Nov 16, 6:16 pm, Vasil Mikhalenya <bazi...@gmail.com> wrote:> Hi all, > > I have > > define vhost($vhost,$db){ > .... > user { "apache" : name => apache, groups => "$title" , require => > User["$title"],}... > > } > > and in nodes.pp > > node ''myhost'' { > wg::web::vhost { "foo": vhost => "vhost1", db => "db1" } > wg::web::vhost { "bar": vhost => "vhost1", db => "db2" } > > } > > In case of 2 vhosts per node user apache in define is duplicated. > > How can I get apache to become a member of all users groups ( name > passed via $title ) > > Thank you > > -- > Best regards, > Vasil Mikhalenya-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.