make the packages role more generic

This commit is contained in:
Matthew Stobbs
2025-01-18 09:24:11 -07:00
parent 3d466e64c7
commit 333ee4c3f5
112 changed files with 1610 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
# install hashicorp vault for RedHat
---
- name: enable hashicorp repo for fedora >=41
become: true
when:
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version|int >= 41
ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo
cmd: dnf config-manager addrepo --from-repofile=https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
- name: enable hashicorp repo for fedora <41
become: true
when:
- ansible_distribution == 'Fedora'
- ansible_distribution_major_version|int < 41
ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo
cmd: dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
- name: enable hashicorp repo for RHEL like distribution
become: true
when:
- ansible_distribution != 'Fedora'
ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo
cmd: dnf config-manager --add-repo https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo