Hi,
this exactly is the reason why one should make use of roles and profiles
see
http://www.craigdunn.org/2012/05/239/
http://projects.puppetlabs.com/projects/puppet/wiki/Infrastructure_Design_Guidelines
http://docs.puppetlabs.com/pe/latest/puppet_assign_configurations.html#assigning-configuration-data-with-role-and-profile-modules
Personally I prefer a module with the name "role"
e.g.
role/manifests/base.pp
class role::base {
include ntp
include backup
include security
}
And within my node I am using this role:
node 'foobar' {
include role::base
...
}
hth,
Martin
On 19 Mar 2014, at 09:58, AAB !! <[email protected]> wrote:
> Hi,
> Could someone tell me how can I have hierarchy in puppet classes ?.
> I have some classes for services like ntp,ssh and many more. What I want is,
> these classes should be included for every puppet agent/node. Could I make a
> parent class and include these classes into in. And then in the node file for
> agent I can include only this parent class.
> Now in future if I have to include any new basic service like *backup* I
> dont have to edit the node file for each node to include the backup class, I
> will simply include the backup class in the parent class and all of my nodes
> will have that backup configuration.
>
>
>
> Regards
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/6d7dc4aa-f6cb-4e52-8f3e-8e55b585af8e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/53E5D619-5BD2-4406-BAAF-D14700C092A2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.