[yes, this is a reply to an OOOLD message. sorry :) I think it's still useful]
This is regarding a construct that I suggested to the list back in May, and still haven't found anything better for my purposes.
So, I'm fleshing out the implementation details for people a bit more.
The idea:
Have a pseudo-database-driven site.pp... without the bother of setting up an actual standalone database, etc, etc.
I would have preferred if puppet some built-in manifest support for
(load nodes/$hostname.pp)
But since it doesn't... here's the next best thing
The advantage to using this methodology:
1. no extra software package to install and maintain for a DB
2. breakage in a host-specific file, does not affect any other host.
In contrast, using "import nodes/*.pp" is fragile to any problem in any node file. Not to mention inefficient in loading potentially hundreds of node definitions every time, when they are not needed.
The implementation:
In site.pp, have, as pretty much the only line,
include "autohost::$hostname"
Then in modules/autohost/manifests/yourhost.pp, have contents of
class autohost::yourhost {
# Whatever-you-want-here
}
Now to address an older question,
On Wednesday, May 2, 2012 6:44:45 PM UTC-7, denmat wrote:
Hi,
...
This all sounds like a lot of work to me. How do you intend to manage changes that effect 300 nodes?
Very easy. Presuming that there is something these 300 nodes have in common; you make a shared base class for them.
eg:
class autohost::yourhost inherits autohost::commonbase {
# Whatever-you-want-here
}
Want to make a "global" change? Then make it to autohost::commonbase.
Similarly, for smaller subgroupings, you treat the autohost::yourhost class, as a node definition, and just include any host-specific class you want.
class autohost::yourhost inherits autohost::commonbase {
include specialserverclass1
include specialserverclass2
#etc, etc.
}
.