File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -9,19 +9,20 @@ Terraform, then (re-)provision them with Ansible. It's pretty neat.
99
1010Just 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
You can’t perform that action at this time.
0 commit comments