darkwizard242.terraform
Ansible Role: Terraform
This role installs the Terraform package on Debian/Ubuntu and EL systems by default.
Requirements
No special requirements.
Role Variables
Here are the available variables (found in defaults/main.yml
):
Variables list:
terraform_app: terraform
terraform_version: 1.9.5
terraform_os: "{{ ansible_system | lower }}"
terraform_architecture_map:
amd64: amd64
arm: arm64
x86_64: amd64
armv6l: armv6
armv7l: armv7
aarch64: arm64
32-bit: "386"
64-bit: amd64
terraform_dl_url: https://releases.hashicorp.com
terraform_dl_loc: /tmp
terraform_bin_path: /usr/local/bin
terraform_file_owner: root
terraform_file_group: root
terraform_file_mode: '0755'
Variables table:
Variable | Description |
---|---|
terraform_app | The name of the app to install, which is terraform. |
terraform_version | The version of Terraform to install (default is 1.9.5). |
terraform_os | The type of operating system, used to download the right binaries. |
terraform_architecture_map | Used to map the operating system architecture to the correct binaries. |
terraform_dl_url | The URL to download the Terraform binary from. |
terraform_dl_loc | Where to temporarily store the Terraform binary (default is /tmp). |
terraform_bin_path | The path where the Terraform binary will be stored (default is /usr/local/bin). |
terraform_file_owner | The owner of the Terraform binary file. |
terraform_file_group | The group of the Terraform binary file. |
terraform_file_mode | The permissions for the Terraform binary file. |
Dependencies
There are no dependencies.
Example Playbook
To use this role for default installation of Terraform in Ansible playbooks:
- hosts: servers
roles:
- darkwizard242.terraform
To customize the version of Terraform being installed:
- hosts: servers
roles:
- darkwizard242.terraform
vars:
terraform_version: 0.12.27
To change the location where the Terraform binary is installed:
- hosts: servers
roles:
- darkwizard242.terraform
vars:
terraform_bin_path: /bin/
License
Author Information
This role was created by Ali Muhammad.
Informazioni sul progetto
Role for installing 'terraform' for performing Infrastructure as Code (IaC).
Installa
ansible-galaxy install darkwizard242.terraform
Licenza
mit
Download
9.3k
Proprietario
Senior DevOps/CloudOps Engineer.
Dedicated to Automating everything I come across.
Love to work on and learn new technologies/tools everyday!