A Terraform provider serving as an interop layer for an Ansible dynamic
inventory script.
Read the introductory blog post for an explanation of the design
motivations behind this provider.
Installation
To install a third-party plugin on your system, follow the plugin installation
instructions provided by Terraform.
resource "ansible_host" "example" {
inventory_hostname = "example.com"
groups = ["web"]
vars {
ansible_user = "admin"
}
}
resource "ansible_group" "web" {
inventory_group_name = "web"
children = ["foo", "bar", "baz"]
vars {
foo = "bar"
bar = 2
}
}
Alternatives and Similar Projects
A Terraform Provisioner that runs Ansible-Local on a target machine at creation-time.
A very similar solution to this one, without the Logical provider. Depends on
specific Terraform resource types, and relies heavily on cloud-providers' tag
implementations.
An Ansible module that runs Terraform plans and deployments.
License
Contributions specific to this project are made available under the
Mozilla Public License.
Code under the vendor/ directory is copyright of the various package owners,
and made available under their own license considerations.