Douglas Garstang writes:
 > > classes: [ <Puppet class names go here> ]
 > > parameters: { <arbitrary variable=value settings go here> }
 > >
 > > So if you need different Apache versions on two different nodes, your
 > > node classifier could supply this for node1:
 > >
 > > classes: [ apache-server ]
 > > parameters: { apache_version=2.0.63 }
 > >
 > > and this for node2:
 > >
 > > classes: [ apache-server ]
 > > parameters: { apache_version=2.2.15 }
 > >
 > > And then in each node $apache_version would indicate which version to
 > > install, which you could use in a "package" resource or whatever.
 > 
 > Steven,
 > 
 > Trying to understand this, but let's say we had multiple instances of
 > Apache running on each server (we actually have multiple instances of
 > JBOSS and Tomcat running, but lets stick with Apache for the analogy).
 > 
 > How would defining variables work then? I mean, your example above has:
 > 
 > parameters: { apache_version=2.2.15 }
 > 
 > Extending this, we'd end up using:
 > 
 > parameters: { apache1_version=2.2.15, apache2_version=2.2.16,
 > apache3_version=2.2.16, apache4_version=2.2.17 }
 > 
 > and so on, depending on what the syntax is:
 > 
 > HOWEVER, we also define a number of different parameters for each
 > instance of software, which makes the whole set of parameters even
 > more complicated. Do external nodes work in this case?

You could use separate classes to manage the separate instances, or if
there's enough common infrastructure, you could use class inheritance or
variable settings and conditionals to avoid excessive duplication of
common information.  From what you describe I think you'd have to use
some mixture of techniques, because you appear to have a big fat mess on
your hands.  I don't think I'd try to use variables the way you are
describing, as you probably would be better off using separate classes
to manage those separate instances.

External nodes should be able to do what you need either way.  If you
have a particularly complicated environment then you're likely to have
to stuff more information into the external node database.

-- 
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.

Reply via email to