Hello,
Just a thought for a future development and it maybe has already been discussed.
It could be interesting if ansible had a module to :
- start a playbook on another machine (launch ansible on that machine with arguments)
- fail when the remote run fails
- gather the results from this remote execution and merge them in the current run
in some way, it would be delegating a playbook execution to a remote machine.
this way, we could cascade ansible across hosting clusters and benefit from the best performance since every time the control machine would be near the remotes.
Yeah so Func had this feature waaaaay back in the day.
We have some patents on it, in fact Steve Salesvan did most of the work and later went on to maintain Func for Tumblr for a while. Fun stuff.
I’m not sure many people used it.
https://fedorahosted.org/func/wiki/DelegationModule
I’d be interested, but it might be complicated.
The reason I haven’t done this yet is because I’d really want output to work as if the workers weren’t there, though obviously you can push out playbooks today with rsync and then run ansible via ansible today, if you really want to – the output you get would be split up.
I’m not going to hold up progress if a sound attempt is made, but I’m going to be picky. I’d generally thinking multiple celery workers in AWX – with each worker getting part of the inventory, would be a much more robust solution, that would give intermediate job status. Then each host would just talk back to AWX using the standard callbacks.
I won’t hold up progress to add something like that in Ansible core, though I tend to believe it should require a few more moving parts to be really strong.