28 lines
993 B
YAML
28 lines
993 B
YAML
# 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
|