Installs Terraform
See meta/main.yml
See meta/main.yml
- hosts: servers
roles:
- andrewrothstein.terraform
MIT
Andrew Rothstein [email protected]
License: MIT License
Installs Terraform
See meta/main.yml
See meta/main.yml
- hosts: servers
roles:
- andrewrothstein.terraform
MIT
Andrew Rothstein [email protected]
Howdy!
Noticed that master
has support for 0.11.7
however the current galaxy version only has support for 0.11.6
via version 2.2.9
in Galaxy. Was wondering if a new version could be pushed to Galaxy.
Thanks!
0.12.29 is there but 0.12.30 is not, for those of us stuck on older versions for various reasons.
Could you support the latest version of Terraform?
Hello,
I was trying to install terraform 0.14.11 using your role but unfortunately I found out that it is absent.
defaults/main.yml:
'0.14.10':
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_darwin_amd64.zip
darwin_amd64: sha256:4b2acb55c6350cba92769c852d4502dff3e185726fc5293e3ab0bb64393846c4
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_freebsd_386.zip
freebsd_386: sha256:3f34d609a8c54a84eddf4f519e4f53ca59e7016236862093737eff6091f8092b
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_freebsd_amd64.zip
freebsd_amd64: sha256:06cba2ba82edabe2f329000283323988c17d4445e3fd1f19534bf1c22d2319cc
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_freebsd_arm.zip
freebsd_arm: sha256:5a706e3096ce5855efc52b6ffb02796450f86b9489604e7ff715409159470745
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_linux_386.zip
linux_386: sha256:7292b67b78178da2076b79b6a7c67352fe44d3df33c0009038fea778828f3bb1
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_linux_amd64.zip
linux_amd64: sha256:45d4a12ca7b5c52983f43837d696f45c5ed9ebe536d6b44104f2edb2e1a39894
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_linux_arm.zip
linux_arm: sha256:3594abff30bd487e814ea458321fb003541b361c8441d65650a44d08bcce0d0b
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_openbsd_386.zip
openbsd_386: sha256:e45b18003c7077a259aa9bdd71aa94943501eff4c9e5fed5ed756143d05653a3
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_openbsd_amd64.zip
openbsd_amd64: sha256:3b26cb7ea73fd5364fc0c728a12c305512b597cf5fb969ce980f345957e5f68c
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_solaris_amd64.zip
solaris_amd64: sha256:7a92ed3c81539629847dec9178a9eb0f62a388bdbb6955b48ab7dd70feec795e
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_windows_386.zip
windows_386: sha256:c73fd3ff67f535ca2d1192484281bc22edc209938a2592db9660e0ffa95932d5
# https://releases.hashicorp.com/terraform/0.14.10/terraform_0.14.10_windows_amd64.zip
windows_amd64: sha256:6b40c552cdc91af4b9aa854f6e8e41d9fcc6b549f4cef1df6c1b9d1a6c7d0535
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_SHA256SUMS
'0.15.0':
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_darwin_amd64.zip
darwin_amd64: sha256:96537262e38008a421d329ce51c1bc2a1926f0b4e68270c92a81a8a42fa2c513
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_freebsd_386.zip
freebsd_386: sha256:4c92c50a36346b196f21a8b1925692164ac7e17458434fd721445dda9ebb7b1f
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_freebsd_amd64.zip
freebsd_amd64: sha256:71af8ec9ede7bc8533c92a8f85c59749fece88d45b7cfb9835bfc4e91ed0b5cd
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_freebsd_arm.zip
freebsd_arm: sha256:bace7c9f1d60348897ce28c223d53bf568b9edabb446172e0527e566726e9996
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_linux_386.zip
linux_386: sha256:1d7a7fe31b9c11881710b8ddf3d2353ebe3afc5f93a51177e70148f39abc8fd3
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_linux_amd64.zip
linux_amd64: sha256:69c5db7bd6d4a5d3dd060678e5c3d9442e32610ed05879b4325e6aa4807d0529
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_linux_arm.zip
linux_arm: sha256:f9b034762d0acdb04b4d7a095c1c6a4088e6e064cc510a6d6e2479e957406204
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_openbsd_386.zip
openbsd_386: sha256:7a6c01f9c9a7036e32d6387f714ed11a008c42fc5bf059074874dd562f07e999
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_openbsd_amd64.zip
openbsd_amd64: sha256:3dfaaa63bc5b3f1c79d4100fa89b3a603057dcca329b3afdabfb0b6ac1783c27
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_solaris_amd64.zip
solaris_amd64: sha256:ecaee209578923dfbc96079b3806fc0009c18dea36a8b09bc05642eb839a9b29
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_windows_386.zip
windows_386: sha256:fa3ffcfe85cca5e83faa2c95a9e1518a214a2b68b34a7627fe448ef95c50f09a
# https://releases.hashicorp.com/terraform/0.15.0/terraform_0.15.0_windows_amd64.zip
windows_amd64: sha256:fa55cc82adc4b91fa4f718941da79c3b695aa597e244dae40b574d966bb40692
# https://releases.hashicorp.com/terraform/0.15.1/terraform_0.15.1_SHA256SUMS
I can see version 0.14.11 in Terraform release
https://releases.hashicorp.com/terraform/0.14.11/
May I ask if you can add also version 0.14.11?
Attempting to install the current latest version of the role (2.2.95) throws an error ...
ansible-galaxy install andrewrothstein.terraform,v2.2.95 --force-with-deps
- changing role andrewrothstein.terraform from v2.2.91 to v2.2.95
- downloading role 'terraform', owned by andrewrothstein
[WARNING]: - andrewrothstein.terraform was NOT installed successfully: - the specified version (v2.2.95) of andrewrothstein.terraform was not found in the list of available versions ...
....
When NOT specifying the version, galaxy successfully installs v2.2.85
ansible-galaxy install andrewrothstein.terraform --force-with-deps
- downloading role 'terraform', owned by andrewrothstein
- downloading role from https://github.com/andrewrothstein/ansible-terraform/archive/v2.2.85.tar.gz
- extracting andrewrothstein.terraform to /c/Data/wsl2/ansible/roles/andrewrothstein.terraform
- andrewrothstein.terraform (v2.2.85) was installed successfully
...
Using this method of checking what versions are available, it only goes up as high as 2.2.85 (purposely elided for brevity)
ansible-galaxy role install andrewrothstein.terraform,wrong 2>&1 | grep -o "'version': '[^']*'" | sort
'version': '1.0.0'
'version': '1.0.1'
'version': '2.0.0'
'version': '2.0.1'
...
'version': '2.2.80'
'version': '2.2.81'
'version': '2.2.83'
'version': '2.2.84'
'version': '2.2.85'
Each time there is an new version, must manually update the terraform_checksums variables.
I have an idea on how to automatically retrieve the checksum from the online SHA256SUMS file. It only depends commands grep and cut, something like below:
- name: Download SHA256SUMS file
get_url:
url: '{{ terraform_checksums_url }}'
dest: /tmp/{{ terraform_checksums_file }}
- name: get the checksum from file
shell: "fgrep {{ terraform_zip }} /tmp/{{ terraform_checksums_file }} | cut -d ' ' -f 1"
register: terraform_checksum
- name: download terraform...
become: yes
become_user: root
get_url:
url: '{{ terraform_url }}'
dest: /tmp/{{ terraform_zip }}
checksum: '{{ terraform_checksum.stdout }}'
If it's good, I can make a pull request later.
Thanks for maintaining a number of really useful Ansible roles.
Ansible Galaxy version v2.2.70 links to this github repo. However when running the role Terraform version installed is 1.0.1 rather than the 1.0.2 declared as the default ?
https://github.com/andrewrothstein/ansible-terraform/blob/master/defaults/main.yml
---
terraform_ver: 1.0.2
...
The following error occurs:
TASK [andrewrothstein.terraform : downloading https://releases.hashicorp.com/terraform/1.0.2/terraform_1.0.2_linux_amd64.zip...] ********************************************************************************
fatal: [wsl2.local]: FAILED! =>
msg: |-
The task includes an option with an undefined variable. The error was: 'dict object' has no attribute '1.0.2'
The error appears to be in '/c/Data/wsl2/ansible/roles/andrewrothstein.terraform/tasks/main.yml': line 10, column 7, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
block:
- name: downloading {{ terraform_url }}...
^ here
...
Any chance of creating a 1.0.4 version.
Kind Regards
Fraser
Only "unzip" is needed to decompress Terraform but "unarchive-deps" fails with
{"ansible_loop_var": "item", "changed": false, "item": "xz", "msg": "No package matching 'xz' is available"}
I don't want "xz" installed, "unzip" installation is acceptable.
As far as I see, running this playbook on a server with already existing installation, the playbook will skip rather than upgrade to latest version (https://github.com/andrewrothstein/ansible-terraform/blob/master/tasks/main.yml#L8).
Will it be possible please to make the changes to support also upgrading? Or is there something I am missing?
Thank you.
Needs support for the latest version of Terraform.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.