You can use regex matches against your nodes' facts, $hostname for
example, to select classes or resources to include.  Actually, you can
do this at at least two levels:

At node level:

node /wwwfe/ {
  include "base_line"
  include "wwwfe"
}

OR

node default {
  include "base_line"
}

node /wwwfe/ inherits default {
  include "wwwfe"
}

---

At statement level:

node default {
  include "base_line"

  case $hostname {
    /wwwfe/: { include "wwwfe" }
  }
}


Doing it at statement level, using 'case' or 'if' statements, can
better support machines that have multiple specializations.

If you want to manage the same file on all nodes, varying its contents
according to nodes' facts, then Brian's suggestion to use templates is
perhaps a better alternative (though that's not the only use case for
templates).

If you want to manage variants of a resource of another type, then you
may find it useful to use subclasses to override resource properties.
You might then declare default resources directly or indirectly in
class "base_line", and specialize the properties of some of them on
specific node groups by including appropriate subclasses on the nodes
of those groups.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to