|
Re: Specifying geographic related facts: msg#00225sysutils.puppet.user
McLeod, Matt wrote: > We did this by writing a custom fact to examine the IP address, as each > site is on a different subnet. It's working well for us. > I suppose we could something like that however in our case things are bit more complicated since internal IPs in these sites are identical. I figured out a roundabout way of doing it. Basically we have a central subversion repository with all the configs. This machine pushes all the configs up to different sites through a BASH script. What I did then is rename site.pp to site.pp.template. I stuck following in the beginning of the file $site_id="===SITEID===" Then in my BASH script I find out what SITEID I am syncing to # Generate Site.pp that contains SITEID in it cat $SVN_CHECKOUT/puppet-manifests/site.pp.template | sed "s/===SITEID===/$SITEID/g" > $SVN_CHECKOUT/puppet-manifests/site.pp When I am done rsyncing I delete rm -f $SVN_CHECKOUT/puppet-manifests/site.pp Now siteA has site.pp that starts with $site_id="siteA" while siteB has $site_id="siteB" I hope this helps someone :-). Vladimir > -----Original Message----- > From: puppet-users-bounces@xxxxxxxxxxx > [mailto:puppet-users-bounces@xxxxxxxxxxx] On Behalf Of Vladimir > Sent: Friday, 12 October 2007 7:40 AM > To: Puppet User Discussion > Subject: [Puppet-users] Specifying geographic related facts > > Let's say I have two different geographic sites. They are pretty much > identical ie. each site has a machine called web1 which is a web server, > > etc. Except there are couple site-specific settings ie. outgoing DNS > servers are different, SSL certs are different etc. > > On the puppetmaster I can put in a file called e.g. > > /etc/sideid > > which would uniquely identify a site ie. siteX or siteY. How would I on > the managed nodes get these fact propagated so that > > - siteX-web1 gets certificate for web1.siteX.domain.com > - siteY-web1 gets certificate for web1.siteY.domain.com > > The key is that I want to keep these sites nearly identical without > needing to generate bunch of configuration duplication. > > Thanks, > > Vladimir > _______________________________________________ > Puppet-users mailing list > Puppet-users@xxxxxxxxxxx > https://mail.madstop.com/mailman/listinfo/puppet-users > _______________________________________________ > Puppet-users mailing list > Puppet-users@xxxxxxxxxxx > https://mail.madstop.com/mailman/listinfo/puppet-users > |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Specifying geographic related facts: 00225, McLeod, Matt |
|---|---|
| Next by Date: | Re: error message: undefined method `parentof?': 00225, Alexander Taler |
| Previous by Thread: | Re: Specifying geographic related factsi: 00225, McLeod, Matt |
| Next by Thread: | puppetd dies?: 00225, Ryan Dooley |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |