Skip to content

Commit

Permalink
fix: revert change from yum to dnf for compatibility reasons (#32)
Browse files Browse the repository at this point in the history
* fix: revert change from yum to dnf for compatibility reasons

* chore: noqa on yum to allow pipeline to pass

* fix: add conditional for using yum vs. dnf

* fix: fix conditionals, make comparisons more sensible
  • Loading branch information
gianklug authored Sep 30, 2024
1 parent 4fa0590 commit d3e7654
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion tasks/installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@
name: https://pkg.adfinis-sygroup.ch/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
state: present
when: ansible_distribution == 'RedHat'
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version | int > 7

- name: Install fedora epel repository for CentOS < 8 # noqa fqcn[action-core]
ansible.builtin.yum:
name: https://pkg.adfinis-sygroup.ch/epel/epel-release-latest-{{ ansible_distribution_major_version }}.noarch.rpm
state: present
when:
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version | int < 8

- name: Deactivate the epel repository
ansible.builtin.yum_repository:
Expand Down Expand Up @@ -121,7 +131,18 @@
name: "{{ icinga2_agent_packages }}"
enablerepo: "{{ icinga2_agent_packages_enablerepo }}"
state: present
when: ansible_os_family == 'RedHat'
when:
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version | int > 7

- name: Install icinga 2 agent packages for CentOS < 8 # noqa fqcn[action-core]
ansible.builtin.yum:
name: "{{ icinga2_agent_packages }}"
enablerepo: "{{ icinga2_agent_packages_enablerepo }}"
state: present
when:
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version | int < 8

- name: Start and enable icinga2
ansible.builtin.service:
Expand Down

0 comments on commit d3e7654

Please sign in to comment.