Closed cad closed 8 years ago
@Cad I primarily did this to avoid having to do any potentially, potentially complicated rewiring of the ssh connection from the ansible plugin. Digging through the plugin structure, it seemed a lot more "natural" to just use the built in command execution framework that terraform exposes.
I'm open to suggestions and opinions, however. I'd imagine in a future world, this could be configurable from the plugin itself. If its possible, I don't see any reason to not support running from the target or the terraform host.
@jonmorehouse got it. To me it's more preferabble having ansible run on the local because that's the way we are accustomed to do it. That way the target is untouched except for the result of the playbook that we provide. Not to mention benefits of getting rid of the burden to support numerous operating systems on the remote to install ansible for bootstrapping.
Yeah, people are definitely in general going to be running ansible locally and provisioning many instances with one playbook. I would really like features for creating the inventory file, defining hosts and groups from my instances, and then running one playbook at the end of my provision.
https://github.com/adammck/terraform-inventory I am using this for inventory
I got my answer, so closing this issue.
Why not running ansible-playbook on the host that terraform is being run, instead of running it on the target I wonder?