Skip to content

chourobin/tf-to-inventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Terraform to Inventory

This is a small python script that generates an Ansible inventory from a Terraform state file. You can spin up a bunch of VMs using Terraform and then provision them with Ansible.

Usage

# run from the directory where your terraform.tfstate file is located
python tf-to-inventory.py

Look at the example hosts file to see the output of this script.

Acknowledgement

Inspired by the zookeeper-ansible-terraform recipe. I adopted much of the code and added support for Amazon EC2 instances.

License

MIT

About

Terraform state to Ansible inventory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages