fixing hashicorp

This commit is contained in:
Matthew Stobbs
2025-02-23 02:41:02 -07:00
parent 3b22dbf6a9
commit 57b3b93a18
2 changed files with 10 additions and 4 deletions

View File

@@ -1,5 +1,9 @@
# vim: set filetype=yaml.ansible :
---
- name: Load hashicorp repo config
ansible.builtin.include_tasks:
file: config/hashicorp.yml
- name: RedHat repository
when:
- ansible_os_family == 'RedHat'
@@ -11,7 +15,7 @@
- ansible_distribution_major_version|int >= 41
ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo
cmd: "dnf config-manager addrepo --from-repofile={{ pkgconfig.hashicorp.Linux.Fedora.repo }}"
cmd: "dnf config-manager addrepo --from-repofile={{ hashicorp.repo }}"
- name: Enable hashicorp repo for fedora <41
become: true
@@ -20,7 +24,7 @@
- ansible_distribution_major_version|int < 41
ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo
cmd: "dnf config-manager --add-repo {{ pkgconfig.hashicorp.Linux.Fedora.repo }}"
cmd: "dnf config-manager --add-repo {{ hashicorp.repo }}"
- name: Enable hashicorp repo for RHEL like distribution
become: true
@@ -28,7 +32,7 @@
- ansible_distribution != 'Fedora'
ansible.builtin.command:
creates: /etc/yum.repos.d/hashicorp.repo
cmd: "dnf config-manager --add-repo {{ pkgconfig.hashicorp.Linux.RedHat.repo }}"
cmd: "dnf config-manager --add-repo {{ hashicorp.repo }}"
- name: Debian based repository
when:

View File

@@ -2,7 +2,9 @@ hashicorp:
Linux:
".el9":
repo: https://rpm.releases.hashicorp.com/RHEL/hashicorp.repo
fedora:
".fc40":
repo: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
".fc41":
repo: https://rpm.releases.hashicorp.com/fedora/hashicorp.repo
debian:
repo: "deb [arch={{ ansible_architecture }} signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com {{ ansible_distribution_release }} main"