splitting roles

This commit is contained in:
2021-03-03 13:34:26 +00:00
parent 199e0449e6
commit 743c1f8a57
8 changed files with 209 additions and 163 deletions

View File

@@ -0,0 +1,19 @@
- name: Install and configure Terraform
tags: terraform
become: true
become_user: "{{ default_user }}"
block:
- name: Install tfenv
git:
repo: https://github.com/tfutils/tfenv.git
version: master
dest: "{{ default_user_home }}/.tfenv"
depth: 1
- name: Install latest version of Terraform
shell: "{{ default_user_home }}/.tfenv/bin/tfenv install latest"
args:
creates: "{{ default_user_home }}/.tfenv/version"
- name: Use latest version of Terraform
shell: "{{ default_user_home }}/.tfenv/bin/tfenv use latest"