Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions resources/roles/install_uninstall/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
---
el7_disablerepo_pkg_prefixes:
- grub
el7_disablerepo_repos:
- centos-7-os
- centos-7-updates
dnf_download_utils_pkg: "dnf-utils"
yum_download_utils_pkg: "yum-utils"
force_install_pkgs:
Expand Down
17 changes: 11 additions & 6 deletions resources/roles/install_uninstall/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
is_ea_apache24_mod_lsapi: "{{ pkg_name.startswith('ea-apache24-mod-lsapi') }}"
is_ea_apache24_mod_cgid: "{{ pkg_name.startswith('ea-apache24-mod_cgid') }}"
is_ea_apache24_mod_http2: "{{ pkg_name.startswith('ea-apache24-mod_http2') }}"
dnf_args: "{{ default_dnf_args | combine(extra_dnf_args) | combine(disablerepo_args) }}"
dnf_args: "{{ default_dnf_args | combine(extra_dnf_args) }}"
force_install: "{{ force_install_pkgs | select('in', pkg_name) | list | length > 0 }}"
apt_args:
allow_unauthenticated: true
Expand All @@ -27,11 +27,6 @@
allow_downgrade: true
lock_timeout: 300
extra_dnf_args: "{{ { 'allowerasing': true } if ansible_facts.distribution_major_version | int >= 8 else {} }}"
_is_el7_disablerepo_pkg: >-
{{ ansible_facts.distribution_major_version == '7'
and el7_disablerepo_pkg_prefixes | default([]) | length > 0
and pkg_name | regex_search('^(' + el7_disablerepo_pkg_prefixes | join('|') + ')') is not none }}
disablerepo_args: "{{ {'disablerepo': el7_disablerepo_repos | join(',')} if _is_el7_disablerepo_pkg else {} }}"
tags:
- install_package

Expand Down Expand Up @@ -117,6 +112,16 @@
tags:
- install_package

- name: Downgrade grub2 packages on EL7
ansible.builtin.shell:
cmd: "yum downgrade -y grub2*-{{ pkg_version }}"
when:
- ansible_facts.os_family == 'RedHat'
- ansible_facts.distribution_major_version == '7'
- pkg_name.startswith('grub2')
tags:
- install_package

- name: Install RPM package
ansible.builtin.package:
name: "{{ pkg_name }}"
Expand Down
Loading