On Sun, 2 May 2010, linuxdatacenter wrote: > Hi, > > Just want to know how you use puppet to cover a scenario where you > have a production and backup datacenter. Both environments should be > similar but not identical (just a dumb example - your ntp setup is > probably different in each). I think it's desirable to have just one > implementation of modules and classes shared among production and > backup so as not to make changes in 2 places which is error prone.
We have a function that sets a variable based on the subdomain portion of the fqdn and use that variable to key datacenter specific variables. Our fqdn contains the datacenter - for example the NTP server in Seattle is ntp.sea.example.com. In site.pp we have a giant case statement like: $datacenter = getdatacenter() case $datacenter { sea: { $ntpserver = 'ntp.sea.example.com' ... } sfo: $ntpserver = 'ntp.sfo.example.com' ... } } Then put $ntpserver in the ntpd.conf template. I'd be happy to share the function if anyone's interested. -Eric -- 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.