Skip to content

Commit

Permalink
Make Terraform url a variable
Browse files Browse the repository at this point in the history
This commit introduces the terraform_binary_url that will contain the full URL
for the binary download.
  • Loading branch information
rascasoft committed Mar 20, 2024
1 parent bb6986d commit c8d7a97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
terraform_binary_install: true
terraform_binary_version: '0.14.2'
terraform_binary_platform: 'linux_amd64'
terraform_binary_url: "https://releases.hashicorp.com/terraform/{{ terraform_binary_version }}/\
terraform_{{ terraform_binary_version }}_{{ terraform_binary_platform }}.zip"

# Where to deploy terraform resource files
terraform_config_dir: 'terraform'
Expand Down
3 changes: 1 addition & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

- name: Download and extract terraform binary
ansible.builtin.unarchive:
src: "https://releases.hashicorp.com/terraform/{{ terraform_binary_version }}/\
terraform_{{ terraform_binary_version }}_{{ terraform_binary_platform }}.zip"
src: "{{ terraform_binary_url }}"
dest: "{{ terraform_config_dir }}/bin"
remote_src: true
when:
Expand Down

0 comments on commit c8d7a97

Please sign in to comment.