My own problem is that once I setup a variable, I can't reassign the variable again in the same module. Based on what I saw in the in dashboard, there is a conflict.
I think I over engineered this piece of my project. I am better off manually creating 40 properties values, treating all of the values as static points of truth, and then just using FILE in 1 huge manifest. Thanks for all your help. It has led me to leverage the Dashboard as an ENC. On Feb 13, 7:56 pm, Brian Gupta <brian.gu...@brandorr.com> wrote: > I would say Global vars aren't necessarily evil. However, they ideally fit > into a hierarchical structure, where one can have variable scoping with an > ability to override global vars with more tightly scoped local overrides. > > Foreman, and Hiera support the ability to set the same variable at > multiple hierarchical levels and have the most "local" variable scoping > override the global. Think Global vars, datacenter vars, domain specific > vars, subnet vars, host vars, hostgroup vars, etc. > > (Folks please correct me if I explained this incorrectly.) > > -Brian > > > > > > > > > > On Mon, Feb 13, 2012 at 12:14 PM, Kenneth Lo <k...@paydiant.com> wrote: > > Eric: > > > Can you elborate on why global variables is a bad idea? Most of my > > environment's key-value pairs are set via dashboard as ENC, which I think > > are all global. > > > --KL > > > From: Eric Shamow <e...@puppetlabs.com> > > Reply-To: "puppet-users@googlegroups.com" <puppet-users@googlegroups.com> > > Date: Sat, 11 Feb 2012 20:48:24 -0500 > > To: "puppet-users@googlegroups.com" <puppet-users@googlegroups.com> > > Subject: Re: [Puppet Users] Question about reusing classes/modules > > > I would avoid this approach - global variables aren't a good idea. > > > Hiera would be a better approach: > > >http://www.devco.net/archives/2011/06/05/hiera_a_pluggable_hierarchic... > >http://www.devco.net/archives/2011/06/06/puppet_backend_for_hiera.php > > > -Eric > > > -- > > > Eric Shamow > > Professional Services > >http://puppetlabs.com/ > > (c)631.871.6441 > > > On Saturday, February 11, 2012 at 7:08 PM, krish wrote: > > > My scenario is this: I have 4 environments, Dev, Test, QA, Prod. Each > > of these environments lives in 2 sites, LA and NY. I have 5 > > applications that are site and env specific. > > > I want to use puppet to template-ize the config files that is required > > for each env, per site, per app, so 40 files. > > > The config file is basically key=value pairs. Here's a simple example > > of what each file may look like: > > > site=LA > > env=Dev > > app=App1 > > masterServer=host1 > > clientServer1=host2 > > clientServer2=host3 > > > How about having these key value pairs in site.pp with a case environment > > Then they become global to all modules. > > > -- > > Krish > > olindata.com > > > -- > > 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. > > > -- > > 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. > > This message is for the designated recipient only and may contain > > privileged, proprietary, or otherwise private information. If you have > > received it in error, please notify the sender immediately and delete the > > original. Any other use of the email by you is prohibited. > > > -- > > 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. > > -- > <http://aws.amazon.com/solutions/solution-providers/brandorr/> -- 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.