Skip to content

Commit 9f33a7e

Browse files
committed
Clarify usage in README
1 parent 2938602 commit 9f33a7e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,20 @@ Terraform, then (re-)provision them with Ansible. It's pretty neat.
99

1010
Just download the OSX binary and run it.
1111

12-
curl -L -O https://github.com/adammck/terraform-inventory/releases/download/v0.2/terraform-inventory
13-
chmod u+x terraform-inventory
14-
./terraform-inventory --list whatever.tfstate
12+
curl -L -O https://github.com/adammck/terraform-inventory/releases/download/v0.2/terraform-inventory
13+
chmod u+x terraform-inventory
14+
./terraform-inventory --list whatever.tfstate
1515

16-
Ansible doesn't (seem to) support calling the inventory script with parameters,
17-
so I like to wrap this tool up in a little shell script, and call that.
18-
Something like:
16+
Ansible doesn't (seem to) support calling the inventory script with parameters
17+
(and this tool doesn't support configuration via environment variables yet), so
18+
I like to create a little shell script and call that. Something like:
1919

2020
#!/bin/bash
21-
terraform-inventory $@ $(dirname $0)/deploy/terraform.tfstate
21+
terraform-inventory $@ deploy/terraform.tfstate
2222

23-
Configuration via environment variables, like most other dynamic inventory
24-
scripts, is coming soon.
23+
Then run Ansible with the script as an inventory:
24+
25+
ansible-playbook --inventory-file=bin/inventory deploy/playbook.yml
2526

2627

2728
## Development

0 commit comments

Comments
 (0)