goodnight

This commit is contained in:
2025-03-27 00:32:02 -05:00
parent ddd5bfc3ac
commit bda585fcd5
9 changed files with 116 additions and 73 deletions

View File

@@ -4,9 +4,6 @@
gather_facts: true
become: true
collections:
- somaz94.ansible_k8s_iac_tool
tasks:
# - Update all packages
# - Install ansible-core
@@ -26,18 +23,21 @@
state: present
become: true
- name: Download terraform
ansible.builtin.get_url:
url: https://releases.hashicorp.com/terraform/terraform_{{ terraform_version }}/terraform_{{ terraform_version }}_{{ ansible_facts.ansible_os_family }}_{{ ansible_facts.ansible_architecture }}.zip
dest: /tmp/terraform.zip
mode: 0755
- name: Register status of /usr/local/bin/terraform
ansible.builtin.stat:
path: /usr/local/bin/terraform
register: terraform_path
- name: Install terraform
ansible.builtin.package:
name: terraform
state: present
become: true
- name: Download and installt erraform version
when: not terraform_path.stat.exists
block:
- name: Download and install terraform
ansible.builtin.unarchive:
src: "https://releases.hashicorp.com/terraform/{{ terraform_version }}/terraform_{{ terraform_version }}_linux_amd64.zip"
dest: "/usr/local/bin/"
remote_src: true
mode: '0755'
exclude: "LICENSE.txt"
roles:
- install_kustomize
- somaz94.ansible_k8s_iac_tool.install_kustomize