Hello, On 12-01-23 02:14 PM, Derek wrote: > I have four major zones in my nework: Development, Quality Assurance, > User Acceptanc Testing, and Production. I am able to deply different > modules to these zones based on the simple regular expressions posted > in the example at the bottom of this message. > > I have two data centers in my network: Salt Lake City and Santa > Clara. I would like to be able to deploy different modules to servers > based on the data center that they reside it. I have tried simple if > statements and case statements but don't seem to be able to deploy my > site based modules. > > Can you give me some imput on the best approach to my problem?
You could use environments to differentiate the nodes..: http://docs.puppetlabs.com/guides/environment.html http://hunnur.com/blog/2010/10/dynamic-git-branch-puppet-environments/ Or (maybe better) you could define a custom fact that tells in which DC your node is present and then branch on the value of this fact: http://www.devco.net/archives/2011/06/29/facter_facts_from_txt_json_yaml_and_non_ruby_scripts.php (see the end of the post for a link to github where you can find the code for custom facts from arbitrary files) -- Gabriel Filion -- 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.