On Wed, Oct 13, 2010 at 10:56 AM, EAMiller <thn...@gmail.com> wrote: > Hi all - new to puppet - and have gotten as far as configuring a > staging server with two of our web apps through puppet. > > Now we plan to have developer workstations get dev environments > through puppet. We have ~8 developers and ~5 web apps we develop. Not > every developer works on every project. > > From my limited experience with puppet I plan to: > 1. Ask each developer what their workstation is called, and which > apps they work on > 2. Create a stanza in node.pp along the lines of: > > node "devstation-bob" inherits "default" { > include appB; > include abbE; > } > > This is fine for my purposes - but I wonder if there's a better way - > I can't imagine scaling the up too far.
Write a custom fact that reads a simple data source like a text file that the developers can write to like: (tested briefly, may have bugs) webapps_conf = "/etc/webapps.conf" if File.readable?(webapps_conf) f = File.open(webapps_conf, 'r') f.readlines.each do |line| webapp = line.chomp Facter.add("webapp_#{webapp}_enabled") do setcode do "true" end end end f.close end and then you'll have a data source the developers can control that specifies what apps they work on, and you can do conditional work in your manifests based upon these values. if $webapp_bar_enabled == "true" { include webapps::bar } etc etc. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.