managing sets of playbooks

I get the virtue of playbooks - they are simple, contained objects for
execution. Great.

how do I manage playbooks for hundreds of hosts assuming I have some
amount of host heterogeneity and I would not want to copy and paste
something a thousand times.

How do I combine a set of playbooks?

I'm thinking puppet-replacement level here - what's the plan?

-sv

Yeah, we need to figure this out a bit.

When I was writing these, I was thinking about how to deploy a web app by pushing source (git plugin TBD), tempting out the Apache config files, restarting if necessary, going to a database server, updating schema, etc. This is the historical difference between Chef and Puppet – Chef makes it easier to visualize the command order, but it also means you have to manage the run order. We’re a bit of a hybrid, in that we have manual order, but also notifiable actions, where an Apache restart can be deferred to the end of a cycle and only run once, like Puppet, but you can still order operations, like Chef.

Another thing is that, as written, a playbook can contain multiple patterns, so you can have a ‘web server’ step, a ‘database server’ set of steps, and then some web server steps back at the bottom. So your entire deployment process for a webapp be one playbook. So if the question was about not being able to express multiple patterns per file, you can, but yes, a notification hook to restart Apache or something might be repeated, and there may be various things in common.

Admittedly, I don’t want to build a big system that allows for sharing variables between things, etc. But to do this right we may need a ‘global’ section at the top or something that dictates things in common for all hosts, like NTP servers or whatever, which might be shared parameters implicitly passed to the ‘setup’ call for both patterns below.

The question is, really, how complex do the things you want to do “at one time” are.

Well, in the Puppet model, you’d have only one model (for everything), maybe you’ve got a playbook for one class of hosts and another for another class of hosts.

Something like an include directive, aka a “run_playbook” command that you can insert into a playbook? Or maybe it’s more like just loading a snippet of tasks from another file and inserting them at the given point?

It almost seems easiest to discuss by talking about a proposed syntax, so I can see what that might look like. Ideally, I would like to avoid sprawling directory structures that imply
meaning, if possible, and allow folks to organize how they want.

Anyway, I want to try to walk the line between it being really simple to understand and write, and also capable. So maybe let’s come up with some proposed syntax for what we want to do and identify what we need to do.

So far, that seems to imply

(A) a global section for all tasks that sets variables to add to the setup module in each
(B) maybe finding a way to list handlers in that global section?

I don’t know exactly. I think most Puppet configurations can get too complicated and we’ll be naturally more concise, but I need a list of concrete things we’re trying to handle.

I tend to think visually better – can you show me some hypothetical syntax for what you’d like to see, and maybe we can try to tweak it on list?

–Michael