I have two a base class *class A { $project = mailbox $nagios_hostgroup = "X" $nagios_contact_groups = "Y" include base_node ## All the common classes goes here }
node mailbox-base { include A } class A-nagios { include A-common # defines for nagios configurations nagios_contact_group { "$nagios_hostgroup" : contactgroup_name => $nagios_hostgroup , alias_name => $nagios_hostgroup , members => $nagios_hostgroup } nagioscontact { $nagios_hostgroup : contact_name => $nagios_hostgroup , alias_name => $nagios_hostgroup } nagioshostgroup { $nagios_hostgroup : hostgroup_name => $nagios_hostgroup , alias_name => $nagios_hostgroup } } node mailbox-base-nagios { include A-nagios } * If i define my classes like these , I can't see $project , $nagios_hostgroup , $nagios_contact_groups in the *host* inheriting node mailbox-base-nagios . If i put variable explicitly in class A-nagios , it works for me class A-nagios { $project = mailbox $nagios_hostgroup = "X" $nagios_contact_groups = "Y" include A-common # defines for nagios configurations nagios_contact_group { "$nagios_hostgroup" : contactgroup_name => $nagios_hostgroup , alias_name => $nagios_hostgroup , members => $nagios_hostgroup } nagioscontact { $nagios_hostgroup : contact_name => $nagios_hostgroup , alias_name => $nagios_hostgroup } nagioshostgroup { $nagios_hostgroup : hostgroup_name => $nagios_hostgroup , alias_name => $nagios_hostgroup } } Is there any other better method to accomplish what I'm trying to do ?? I'm using puppet version 0.24.8 on centos . --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---