nbering / terraform-inventory

An Ansible dynamic inventory script to pair with nbering/terraform-provider-ansible.
MIT License
175 stars 51 forks source link

fill running playbook #4

Closed 3ielevin closed 6 years ago

3ielevin commented 6 years ago

running ansible-playbook -i ../../allinlab-terraform/terraform.py common.yml returns error

[WARNING]: * Failed to parse /Users/elevin/git/allinlab-terraform/terraform.py with script plugin: Inventory script (/Users/elevin/git/allinlab-terraform/terraform.py) had an execution error: Empty state (no state)

[WARNING]: * Failed to parse /Users/elevin/git/allinlab-terraform/terraform.py with ini plugin: /Users/elevin/git/allinlab- terraform/terraform.py:3: Expected key=value host variable assignment, got: json

[WARNING]: Unable to parse /Users/elevin/git/allinlab-terraform/terraform.py as an inventory source

[WARNING]: No inventory was parsed, only implicit localhost is available

I attached the Json state state.txt

3ielevin commented 6 years ago

manage to run it... running from the Ansible directory didn't work, but if I run it from the terraform directory pointing to Ansible playbook it runs fine

nbering commented 6 years ago

There's a minor note about that in the readme under environment variables. I should probably add something to the usage section about that.