2020-09-30 16:05:10 +02:00
|
|
|
---
|
|
|
|
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
|
|
|
|
|
|
|
|
# http://fusioninventory.org/documentation/agent/installation/linux/rhel.html
|
|
|
|
|
2021-03-15 11:41:37 +01:00
|
|
|
- name: Import EPEL GPG key
|
|
|
|
rpm_key:
|
|
|
|
key: "{{ fusioninventory__repo_gpgkey }}"
|
|
|
|
state: present
|
|
|
|
|
2020-09-30 16:05:10 +02:00
|
|
|
- name: Add EPEL Repository
|
2021-03-15 11:41:37 +01:00
|
|
|
yum:
|
|
|
|
name: "{{ fusioninventory__repo_package }}"
|
|
|
|
state: present
|
2021-03-15 12:11:47 +01:00
|
|
|
|
2021-05-11 17:01:28 +02:00
|
|
|
- name: RedHat 8 specifics
|
|
|
|
block:
|
|
|
|
|
|
|
|
- name: Load additional repository settings for CentOS or RedHat 8
|
|
|
|
include_vars: "{{ item }}"
|
|
|
|
with_first_found:
|
|
|
|
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
|
|
|
|
|
|
|
|
- name: Override repository settings for CentOS <= 8.2
|
|
|
|
include_vars: "CentOS-8.2.yml"
|
|
|
|
when:
|
|
|
|
- ansible_facts['distribution'] == "CentOS"
|
|
|
|
- ansible_facts['distribution_version'] | float <= 8.2
|
|
|
|
|
|
|
|
- name: Enable Additional Repository
|
|
|
|
ini_file:
|
|
|
|
path: "{{ fusioninventory__additional_repo_file }}"
|
|
|
|
section: "{{ item.section }}"
|
|
|
|
option: "{{ item.option }}"
|
|
|
|
value: "{{ item.value }}"
|
2021-06-10 11:39:38 +02:00
|
|
|
mode: "0644"
|
2021-05-11 17:01:28 +02:00
|
|
|
loop: "{{ fusioninventory__additional_repo_params }}"
|
|
|
|
|
2021-03-15 12:11:47 +01:00
|
|
|
when: ansible_facts['distribution_major_version'] | int >= 8
|