more fixes, more config
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
file: hashicorp_repo.yml
|
||||
name: _hashicorp
|
||||
- ansible.builtin.set_fact:
|
||||
pkgconfig:
|
||||
hashicorp: "{{ _hashicorp | ansible.builtin.combine(pkgonfig.hashicorp) }}"
|
||||
pkgconfig_hashicorp: "{{ _hashicorp | ansible.builtin.combine(pkgonfig.hashicorp) }}"
|
||||
|
||||
- name: RedHat repository
|
||||
when: ansible_os_family == 'RedHat'
|
||||
@@ -16,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={{ pkgconfig_hashicorp.Linux.Fedora.repo }}"
|
||||
|
||||
- name: enable hashicorp repo for fedora <41
|
||||
become: true
|
||||
@@ -25,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 {{ pkgconfig_hashicorp.Linux.Fedora.repo }}"
|
||||
|
||||
- name: enable hashicorp repo for RHEL like distribution
|
||||
become: true
|
||||
@@ -33,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 {{ pkgconfig_hashicorp.Linux.RedHat.repo }}"
|
||||
|
||||
- name: Debian based repository
|
||||
when: ansible_os_family == 'Debian'
|
||||
@@ -60,7 +59,7 @@
|
||||
|
||||
- name: enable hasicorp repo for debian
|
||||
ansible.builtin.apt_repository:
|
||||
repo: "{{ pkgconfig.hashicorp.Linux.Debian.repo }}"
|
||||
repo: "{{ pkgconfig_hashicorp.Linux.Debian.repo }}"
|
||||
state: present
|
||||
update_cache: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user