cloudposse / terraform-null-ansible

Terraform Module to run ansible playbooks
https://cloudposse.com/accelerate
Apache License 2.0
159 stars 36 forks source link

How to specify hosts file? #18

Open mabushey opened 6 years ago

mabushey commented 6 years ago

there is no inventory file being passed.... :( How can I specify the hosts file? I would like -i ./hosts added to the command string. Terraform is awesome, but when the code is in a module it gets cached and becomes difficult to modify.

mabushey commented 6 years ago

I guess it's dynamic and does not write to an inventory file. The raw install python is not idempotent so I figured it just wasn't working.

mabushey commented 6 years ago

You should also create a group_vars/all file so people can specify the correct pem to use:

$ cat group_vars/all                                                                                                                                                                                                                             
ansible_ssh_private_key_file: ~/.ssh/my_key