mirror of
https://github.com/adammck/terraform-inventory
synced 2024-11-22 20:01:58 +01:00
Clarify usage in README
This commit is contained in:
parent
2938602cae
commit
9f33a7ec91
19
README.md
19
README.md
@ -9,19 +9,20 @@ Terraform, then (re-)provision them with Ansible. It's pretty neat.
|
|||||||
|
|
||||||
Just download the OSX binary and run it.
|
Just download the OSX binary and run it.
|
||||||
|
|
||||||
curl -L -O https://github.com/adammck/terraform-inventory/releases/download/v0.2/terraform-inventory
|
curl -L -O https://github.com/adammck/terraform-inventory/releases/download/v0.2/terraform-inventory
|
||||||
chmod u+x terraform-inventory
|
chmod u+x terraform-inventory
|
||||||
./terraform-inventory --list whatever.tfstate
|
./terraform-inventory --list whatever.tfstate
|
||||||
|
|
||||||
Ansible doesn't (seem to) support calling the inventory script with parameters,
|
Ansible doesn't (seem to) support calling the inventory script with parameters
|
||||||
so I like to wrap this tool up in a little shell script, and call that.
|
(and this tool doesn't support configuration via environment variables yet), so
|
||||||
Something like:
|
I like to create a little shell script and call that. Something like:
|
||||||
|
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
terraform-inventory $@ $(dirname $0)/deploy/terraform.tfstate
|
terraform-inventory $@ deploy/terraform.tfstate
|
||||||
|
|
||||||
Configuration via environment variables, like most other dynamic inventory
|
Then run Ansible with the script as an inventory:
|
||||||
scripts, is coming soon.
|
|
||||||
|
ansible-playbook --inventory-file=bin/inventory deploy/playbook.yml
|
||||||
|
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
Loading…
Reference in New Issue
Block a user