From f23b235ebd81e79c2fb089943a26e19499a429b5 Mon Sep 17 00:00:00 2001 From: Przemyslaw Grondek Date: Wed, 12 Jul 2023 19:44:02 +0200 Subject: [PATCH] Add terraform & terragrunt install --- localhost.yml | 1 + roles/terraform/tasks/main.yml | 20 ++++++++++++++++++++ roles/terraform/vars/main.yml | 5 +++++ 3 files changed, 26 insertions(+) create mode 100644 roles/terraform/tasks/main.yml create mode 100644 roles/terraform/vars/main.yml diff --git a/localhost.yml b/localhost.yml index aaa31e6..dd1c73c 100644 --- a/localhost.yml +++ b/localhost.yml @@ -16,3 +16,4 @@ - prusa-slicer - intellij - chromium + - terraform diff --git a/roles/terraform/tasks/main.yml b/roles/terraform/tasks/main.yml new file mode 100644 index 0000000..4db145a --- /dev/null +++ b/roles/terraform/tasks/main.yml @@ -0,0 +1,20 @@ +- name: "Download terraform {{ terraform.version }}" + become: yes + unarchive: + src: https://releases.hashicorp.com/terraform/{{ terraform.version }}/terraform_{{ terraform.version }}_linux_amd64.zip + dest: /usr/local/bin + remote_src: yes + mode: 0755 + +- name: "Remove terragrunt" + become: yes + file: + path: /usr/local/bin/terragrunt + state: absent + +- name: "Download terragrunt {{ terragrunt.version }}" + become: yes + get_url: + url: https://github.com/gruntwork-io/terragrunt/releases/download/v{{ terragrunt.version }}/terragrunt_linux_amd64 + dest: /usr/local/bin/terragrunt + mode: 0755 diff --git a/roles/terraform/vars/main.yml b/roles/terraform/vars/main.yml new file mode 100644 index 0000000..328cb6f --- /dev/null +++ b/roles/terraform/vars/main.yml @@ -0,0 +1,5 @@ +--- +terraform: + version: 1.3.9 +terragrunt: + version: 0.40.2 \ No newline at end of file