Last active
April 20, 2020 17:34
-
-
Save github-somerandomguy-xyz/c3c4c6d0c4cb059b522ef76ab7fac9e3 to your computer and use it in GitHub Desktop.
install terraform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Ensure required packages are available. | |
package: | |
name: | |
- unzip | |
state: present | |
- name: "Download terraform {{ terraform_version }} binary." | |
get_url: | |
url: "{{ terraform_download_url }}" | |
dest: /tmp/ | |
- name: unarchive and move terraform binary to executable location | |
unarchive: | |
src: "/tmp/terraform_{{ terraform_version }}_linux_amd64.zip" | |
dest: /usr/local/bin/ | |
remote_src: yes | |
- name: change terraform file permissions | |
file: | |
path: /usr/local/bin/terraform | |
mode: u+x | |
owner: "{{ansible_user}}" | |
group: "{{ansible_user}}" | |
- name: cleanup residue | |
file: | |
path: "/tmp/terraform_{{ terraform_version }}_linux_amd64.zip" | |
state: absent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment