On Feb 24, 6:59 am, Rus Hughes <russell.hug...@gmail.com> wrote: > I've got an Apache module and a Nagios module which "require"s the > Apache module, in the Nagios module we need to add the apache user to > the nagios group, what would be the best most scalable method to do > this? Assuming we might have other modules for webapps which need to > add the apache user to other groups in the future?! > > The actual apache user is created by the httpd package (on RedHat) but > in the Apache module can we just manage the user with something like : > > user { "apache": > uid => 48, > gid => 48, > groups => "apache", > > } > > and then in the Nagios module do > > User["apache"]{ groups +> "nagios" } > > ? Or is there a better way? > > Cheers!
We do this by defining the service account as a virtual user and realizing/overriding when necessary. For your example: @user { "apache": uid => 48, gid => 48, groups => "apache", } Then in your nagios module: Realize(User["apache"]) User["apache"] { groups +> "nagios" } Don't forget to realize it in your apache module too. :) -adam -- 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.