Don wrote:
> When I manage systems- I organize them into hierarchies.
>
> All my systems share certain global bits in common- NTP servers or the
> root domain name for example.
>
> All the systems within a given site or environment share other bits in
> common- LDAP servers, a sub domain, default routes, etc. Specific
> sites may even override some of the global settings- for example a
> local NTP server for a mission critical site.
>
> Then I have servers within those sites that once again might override
> the more general site or global settings. The NTP master for a site is
> not going to use itself as a server- it should use a higher precision
> clock from somewhere else. There may be a special ldap base for the
> research department, etc.
>
> I can find no good way in puppet to create these sorts of hierarchies.
>
> If I defined base nodes and try to inherit values- puppet is
> declarative so later values do not get imported.
>
> If I define classes for global, then site, then system and try to do
> something like:
>
> node ntpserver {
> $ntp_master = "accurate.example.com"
> include site::nyresearch
> include site::global
> }
>
> None of the values set in nyresearch will be available to classes in
> global because of scoping rules.
One possibility would be to include site::global within
site::nyresearch. Then the class would receive all variables.
Another possibility is to define a naming convention like this:
$global_ntp
$nyresearch_ntp
$local_ntp
and use a custom function to make a site specific lookup in the ntp class:
$ntp_master = site_value("ntp")
Regards, DavidS
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---