From 57b3b93a184f75f1fcdc93187922f9d85e70cc2f Mon Sep 17 00:00:00 2001 From: Matthew Stobbs Date: Sun, 23 Feb 2025 02:41:02 -0700 Subject: [PATCH] fixing hashicorp --- tasks/repos/hashicorp.yml | 10 +++++++--- vars/pkgs/hashicorp.yml | 4 +++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/tasks/repos/hashicorp.yml b/tasks/repos/hashicorp.yml index a7e2bb1..9f57bc6 100644 --- a/tasks/repos/hashicorp.yml +++ b/tasks/repos/hashicorp.yml @@ -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: diff --git a/vars/pkgs/hashicorp.yml b/vars/pkgs/hashicorp.yml index 725b706..8b7b8e4 100644 --- a/vars/pkgs/hashicorp.yml +++ b/vars/pkgs/hashicorp.yml @@ -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"