With puppet, can you have the client ask to be a certain set of roles?

Posted by Aitch on Server Fault See other posts from Server Fault or by Aitch
Published on 2012-10-30T15:10:11Z Indexed on 2012/11/01 11:03 UTC
Read the original article Hit count: 201

Filed under:
|

I've recently got my puppetmaster and client up and running and have had the client correctly signed, then requested and applied simple changes, all good.

I have a growing number of machines (>100). They are not consistently named (historical reasons). They fall into a handful of categories (think of it like: dataserver_type1, dataserver_type2, webserver_type1, webserver_type2....). New instances of these types of machines are added weekly.

I don't understand (yet) or cannot see how I can declare a "generic" node of (say) "dataserver_type1" that contains whatever modules it needs, and set something in the client puppet.conf that says "I am a dataserver_type1" without using the hostname/FQDN

If I set the node name in the catalog as (say) "my-data-server-type1" - the certified hostname - it picks it up and works. I know you can use patterns for hostnames but as I said, my server names are not consistent, and I can't change them.

This seems disingenuous to have to edit a file and manually add a node for each server, when they continue to grow.

Edit:

Digging deeper, it seems roles may be what I want. But there still seems to be an element whereby the master has contain a list of roles that a specific named server should do. Perhaps what I am asking is, how can a client say "I want to be this role", without the server having to be updated?

© Server Fault or respective owner

Related posts about puppet

Related posts about puppetmaster