On Feb 25, 6:37 am, Michael Gliwinski <michael.gliwin...@henderson-
group.com> wrote:
> Do you define your virtual users in global scope? I.e. in site.pp or in some
> module/class? The reason I'm asking is because I had some trouble overriding
> parameters of resources (even virtual) declared in another class or especially
> a define.
To the best of my knowledge, you can only override resource parameters
in a subclass of the class that declares the resource. Perhaps you
can also override properties of resources declared at global scope,
but I don't generally recommend global resources, even virtual ones.
You might be able to achieve what you want something like this
(completely untested):
# A class containing virtual declarations of all your users
class user::virtual {
# ...
@user { "apache":
uid => 48,
gid => 48,
groups => "apache",
}
# ...
}
# A class in your nagios module that
# exists solely to override User["apache"]
class nagios::apache::user inherits user::virtual {
User["apache"] { groups +> "nagios }
}
# Apache-related nagios settings
class nagios::apache {
include "nagios::apache::user"
realize User["apache"]
# ...
}
Good luck,
John
--
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.