On Wednesday, May 21, 2014 3:27:32 PM UTC-5, Ritesh Nanda wrote: > > Hello , > > I am designing a multi-node deployment env with Puppet. >
Ok. > Scenario i have is once one machine is created it will have its hostname > allocated dynamically , > Ok. > that hostname has to be used by another machine when it runs it manifest > on it . > Huh? What other machine? What is "it"? And "it"? And "it"? > I can get that fqdn of that machine save it in puppetdb and ask another > machine to get that hostname using exported resource Is that correct? > > If you connect a client machine to your puppet master then compilation of the client's catalog can cause a resource to be exported that associates the client's hostname and fqdn. A Host resource would fill that role quite naturally. Supposing that you use puppetdb as your storeconfigs back end (as you should do), those data will be recorded in puppetdb. There are multiple things you can do with the data from there, but I'm not following what specific thing you are looking to do. The situation might be similar if you're using 'puppet apply' with local manifests instead of 'puppet agent' and a central master, but in that case there are likely to be much better ways to store local data than in puppetdb. > Another scenerio in case simultaneously two users runs that module , first > machine save its hostname , same time again that module is intiated by > another user , now the latest machine would overwrite the entry in puppetdb. > > Why would you suppose that one machine's data would overwrite a different one's? Puppet distinguishes one machine from another by their certs, unless you intentionally confuse it by manually assigning the same cert to multiple machines. Puppetdb associates node data with node identity, so one node's data will not overwrite a different one's. John -- 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 puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/65b2db76-2f22-4e01-abdd-56258891e2a9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.