dnitsch / terraform-provider-ansible

"Logical" provider for integrating with an Ansible Dynamic Inventory script.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible Terraform Provider

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.

Terraform Configuration Example

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.

About

"Logical" provider for integrating with an Ansible Dynamic Inventory script.

License:Mozilla Public License 2.0


Languages

Language:Go 46.1%Language:Shell 42.7%Language:Makefile 11.2%