From 9f33a7ec91b8ffc702dbbbac27b8d32397017678 Mon Sep 17 00:00:00 2001 From: Adam Mckaig Date: Wed, 24 Sep 2014 18:54:39 -0400 Subject: [PATCH] Clarify usage in README --- README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0517541..bfb4cfe 100644 --- a/README.md +++ b/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. - curl -L -O https://github.com/adammck/terraform-inventory/releases/download/v0.2/terraform-inventory - chmod u+x terraform-inventory - ./terraform-inventory --list whatever.tfstate + curl -L -O https://github.com/adammck/terraform-inventory/releases/download/v0.2/terraform-inventory + chmod u+x terraform-inventory + ./terraform-inventory --list whatever.tfstate -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. -Something like: +Ansible doesn't (seem to) support calling the inventory script with parameters +(and this tool doesn't support configuration via environment variables yet), so +I like to create a little shell script and call that. Something like: #!/bin/bash - terraform-inventory $@ $(dirname $0)/deploy/terraform.tfstate + terraform-inventory $@ deploy/terraform.tfstate -Configuration via environment variables, like most other dynamic inventory -scripts, is coming soon. +Then run Ansible with the script as an inventory: + + ansible-playbook --inventory-file=bin/inventory deploy/playbook.yml ## Development