Patrick
2011-Jul-20 22:17 UTC
[Puppet Users] package versioning by environment - best practice?
New puppet user here looking for a yay or nay on whether the current design I''ve got is a good idea. The main thing I''m trying to accomplish is to have a class that gets applied to a production box and a testing box, where the only difference between the two is the version of packages that get installed. The way I''ve accomplished this is to have something like site.ini: node "testwebbox1" { class { "versions": env => "test" } include webbox } node "prodwebbox1" { class { "versions": env => "prod" } include webbox } Then that webbox class would have package types in it that have ''ensure => "httpd-${versions::httpd}"'' The versions class would set $httpd based on that ''env'' argument that gets passed to it. The only other way that springs to mind of doing this is to pass the ''env'' arg to the ''webbox'' class and have it include the versions class. This is probably the better way anyway since webbox depends on variables provided by the versions class. But this is still very similar to the first method, and not an entirely new approach. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.