This is a simple ansible role to install terraform into a RedHat-like 7+ box.
This module hasn't specific requirements just Ansible.
terraform_version: 0.10.5
- terraform_version: Specify the terraform version to install
terraform_dist_file: "terraform_{{terraform_version}}_linux_amd64.zip"
- terraform_dist_file: Terraform distribution archive
terraform_repo_url: "https://releases.hashicorp.com/terraform/{{terraform_version}}/{{ terraform_dist_file }}"
- terraform_repo_url: Terraform distribution URL. Used to fetch the Terraform binary
terraform_base_install_dir: /opt/hashicorp/terraform
- terraform_base_install_dir: Root of the Terraform installation
terraform_bin: /usr/bin/terraform
- terraform_bin: Terraform binary location
terraform_requirements:
- unzip
- terraform_requirements: Terraform playbook requirements
terraform_purge_old: true
- terraform_purge_old: Delete the oldest version installed in the system. Default: true
terraform_cleanup: true
- terraform_cleanup: Remove the Terraform distribution archive. Default: true
---
- hosts: localhost
become: true
connection: local
roles:
- mauromedda.ansible_role_unzip
- mauromedda.ansible_role_terraform
BSD
Author: Mauro Medda