Re: [Puppet Users] How to parse same template with differen values each time

2013-11-20 Thread Felix Frank
Yes, that's a limitation you get from relying on hashes in your hierarchy. Tough call. Of course, you *could* override the entire hash where necessary. Or, you could cut out the top level of the hash and make each hash key a hiera key instead: countrydata_us: option1: option2: ... countryda

Re: [Puppet Users] How to parse same template with differen values each time

2013-11-20 Thread Jordan Cabral
I tried that, but in that way I cant override internal vars of the hash (option1) in different files of the hiera hierarchy, because I need to ask to hiera for the entire hash. El miércoles, 20 de noviembre de 2013 13:16:50 UTC-3, Felix.Frank escribió: > > Hi, > > you can use a hash, either fro

Re: [Puppet Users] How to parse same template with differen values each time

2013-11-20 Thread Felix Frank
Hi, you can use a hash, either from hiera or in your manifest. $config = { "country1" => { "option1" => "value1", "option2" => ... }, "country2" => { "option1" => ... } ... } In the template, you can access it like this e.g. <% data = config[country] -%> ... "> ... Careful, this is unt

[Puppet Users] How to parse same template with differen values each time

2013-11-20 Thread Jordan Cabral
Hi, I need to parse the a template, with different values, to generate different config files in each country I need to config. The template is used inside a define, this define is used one time for each country. I need that each time y execute this define, the vars used by the template have dif