Purely out of curiosity, what is the suggested course of action to run playbooks present on a remote host within a current run of a local Ansible play?The worst case being to use the shell module to actually exec Ansible remotely with the remote playbook, are there more elegant approaches?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5bb90b4c-d9a8-4b9a-9667-d19664504dbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
So let’s say you have the following situation:
In the situation where you don’t care about local inventory or context, I guess kicking off a remote execution of Ansible using the shell module or SSH would be an option.
But if you _did_ care about the current operating context, it would be interesting if Ansible were able to start a remote “slave” runner that would then run the remote playbooks/roles using the inventory and context delivered from your current local Ansible running instance (the parent/master).
The remote runner would run the remote plays with the host/inventory_hostname set to the remote host's, but at least you’d be able to share context such as facts, variables and inventory and be able to run plays/roles that exist on the remote side. (Just an idea.)
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/7a17c3e8-b323-4ab3-9694-b3b06d1ba837%40googlegroups.com.
Yeah I'm not seeing where you need this yet.Depends on the scale of your infrastructure, but plenty of very very large setups are not doing this -- and really, if you are in that area, treating cloud like cloud and using Ansible to build images is often a great option.