Re: [Puppet Users] change host file depending on location

2012-04-04 Thread Len Rugen
We run Foreman, so I never think of parameterized classes :-) Another thing we do in some places is concatenated templates, there is a common section and different appendages. On Wed, Apr 4, 2012 at 8:35 AM, myeazel wrote: > Depending on how complex the hosts file needs to be, what LenR may be

Re: [Puppet Users] change host file depending on location

2012-04-04 Thread myeazel
Depending on how complex the hosts file needs to be, what LenR may be best or I have sometimes also approached this kind of issue by using parameterized classes can work well too. You can use a define classname ($variables_to_pass_to_template) { } and then you don't have to work with ERB-type c

Re: [Puppet Users] change host file depending on location

2012-04-03 Thread Len Rugen
This sounds like standard file template should work, for that file, use content => template("your-class/your-template.erb"); Then in that file (your-template.erb) you can have: static stuff <% if location == "us-west-1c -%> something <% else %> default stuff <% end %> more static stuff Th

[Puppet Users] change host file depending on location

2012-04-03 Thread Jim Dehune
Hi all, New to puppet and am hoping I can be pointed in the right direction. I have several Amazon EC2 instance in us-east, us-west, eu, and apac. I need different /etc/hosts file for each region. I'm not sure how to implement this in each servers node definition. I'd like to have something lik