On 10.06.2014 18:25, eskhool wrote:
> what is the recommendation or best practice to apply a playbook to a set of
> machines which may often not be running?
You might want to look at running ansible-pull on boot - then each
machine will get into consistent state ASAP.
But that takes some control from you, and can't really be used for
orchestration.
> Shouldn't there be a registry of
> which playbooks have been applied where? Even if playbooks are perfectly
> idempotent, it is highly inefficient to keep applying them again and
> again...
No, but you can build one pretty easily using callback plugins and a
wrapper for filtering.
Not that I think it's needed, as running a play on all machines is often
as quick as running it on just the changed one. Modules do a pretty good
job of not doing things that don't have to be done, and tasks are run in
parallel, which means the only host slowing down a play is the one that
you wanted to target anyway.
> Would like to understand the suggested approach from the ansible designers
> for this use case before looking elsewhere/doing any dev work for the same
Well, I'm not an Ansible designer, but I still hope I had some useful
suggestions :-)
> Thanks,
> eskhool
>