fix remaining packages

This commit is contained in:
Matthew Stobbs
2025-03-03 12:15:05 -07:00
parent 2ce49c9b85
commit ea9e524cf9
13 changed files with 108 additions and 122 deletions

View File

@@ -1,57 +1,49 @@
# vim: set filetype=yaml.ansible :
---
- name: Add hashicorp
- name: Load hashicorp repo config
ansible.builtin.include_tasks:
file: config/hashicorp.yml
- name: RedHat repository
when:
- hashicorp_configured is undefined
- ansible_os_family == 'RedHat'
block:
- name: Load hashicorp repo config
ansible.builtin.include_tasks:
file: config/hashicorp.yml
- name: Enable hashicorp repo
become: true
ansible.builtin.get_url:
url: "{{ hashicorp.repo }}"
dest: /etc/yum.repos.d/hashicorp.repo
mode: '0644'
- name: RedHat repository
when:
- ansible_os_family == 'RedHat'
block:
- name: Enable hashicorp repo
become: true
ansible.builtin.get_url:
url: "{{ hashicorp.repo }}"
dest: /etc/yum.repos.d/hashicorp.repo
mode: '0644'
- name: Debian based repository
when:
- ansible_os_family == 'Debian'
block:
- name: Get hashicorp archive gpg key
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/hashicorp_gpg"
url: https://apt.releases.hashicorp.com/gpg
mode: '0644'
- name: Debian based repository
when:
- ansible_os_family == 'Debian'
block:
- name: Get hashicorp archive gpg key
ansible.builtin.get_url:
dest: "{{ d_tempdir.path }}/hashicorp_gpg"
url: https://apt.releases.hashicorp.com/gpg
mode: '0644'
- name: Install hashicorp archive gpg key
become: true
ansible.builtin.command:
creates: /usr/share/keyrings/hashicorp-archive-keyring.gpg
cmd:
- gpg
- --dearmor
- -o
- /usr/share/keyrings/hashicorp-archive-keyring.gpg
- "{{ d_tempdir.path }}/hashicorp_gpg"
- name: Install hashicorp archive gpg key
become: true
ansible.builtin.command:
creates: /usr/share/keyrings/hashicorp-archive-keyring.gpg
cmd:
- gpg
- --dearmor
- -o
- /usr/share/keyrings/hashicorp-archive-keyring.gpg
- "{{ d_tempdir.path }}/hashicorp_gpg"
- name: Enable hasicorp repo for debian
ansible.builtin.apt_repository:
repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}"
state: present
update_cache: false
- name: Enable hasicorp repo for debian
ansible.builtin.apt_repository:
repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}"
state: present
update_cache: false
- name: MacOS specific configuration
when:
- ansible_distribution == 'MacOSX'
ansible.builtin.set_fact:
brewtap: "{{ brewtap + ['hashicorp/tap'] }}"
- name: Set hashicorp_configured
ansible.builtin.set_fact:
hashicorp_configured: true
- name: MacOS specific configuration
when:
- ansible_distribution == 'MacOSX'
ansible.builtin.set_fact:
brewtap: "{{ brewtap + ['hashicorp/tap'] }}"