Update role for EL9
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adrien Reslinger 2022-06-18 11:05:02 +02:00
parent 609e729a5f
commit d81bc8f5d5
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
2 changed files with 49 additions and 10 deletions

View file

@ -86,10 +86,11 @@
group: root group: root
mode: 0644 mode: 0644
when: when:
- base_autoupdate | bool
- ansible_os_family == "RedHat" - ansible_os_family == "RedHat"
- ansible_distribution_major_version == '7' - ansible_distribution_major_version == '7'
- name: "Configure auto update for RHEL 8 linux family" - name: "Configure auto update for RHEL 8/9 linux family"
template: template:
src: etc/dnf/automatic.conf.j2 src: etc/dnf/automatic.conf.j2
dest: /etc/dnf/automatic.conf dest: /etc/dnf/automatic.conf
@ -97,8 +98,9 @@
group: root group: root
mode: 0644 mode: 0644
when: when:
- base_autoupdate | bool
- ansible_os_family == "RedHat" - ansible_os_family == "RedHat"
- ansible_distribution_major_version == '8' - ansible_distribution_major_version >= '8'
- name: enable a timer for dnf-automatic for RHEL 8 linux family - name: enable a timer for dnf-automatic for RHEL 8 linux family
systemd: systemd:
@ -106,11 +108,12 @@
state: started state: started
enabled: yes enabled: yes
when: when:
- base_autoupdate | bool
- ansible_os_family == "RedHat" - ansible_os_family == "RedHat"
- ansible_distribution_major_version == '8' - ansible_distribution_major_version >= '8'
# https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/managing_monitoring_and_updating_the_kernel/index#applying-patches-with-kernel-live-patching_managing-monitoring-and-updating-the-kernel # https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/managing_monitoring_and_updating_the_kernel/index#applying-patches-with-kernel-live-patching_managing-monitoring-and-updating-the-kernel
- name: Install kpatch packages on RedHat Enterprise Linux 8 - name: Install kpatch packages on RedHat Enterprise Linux 8/9
package: package:
name: name:
- kpatch - kpatch
@ -120,10 +123,11 @@
update_cache: yes update_cache: yes
state: present state: present
when: when:
- base_autoupdate | bool
- ansible_distribution == "RedHat" - ansible_distribution == "RedHat"
- ansible_distribution_major_version == '8' - ansible_distribution_major_version >= '8'
- name: "Configure kernel auto update for RedHat Enterprise Linux 8" - name: "Configure kernel auto update for RedHat Enterprise Linux 8/9"
copy: copy:
src: etc/dnf/plugins/kpatch.conf src: etc/dnf/plugins/kpatch.conf
dest: /etc/dnf/plugins/kpatch.conf dest: /etc/dnf/plugins/kpatch.conf
@ -131,17 +135,19 @@
group: root group: root
mode: 0644 mode: 0644
when: when:
- base_autoupdate | bool
- ansible_distribution == "RedHat" - ansible_distribution == "RedHat"
- ansible_distribution_major_version == '8' - ansible_distribution_major_version >= '8'
- name: enable kernel auto update for RHEL 8 linux family - name: enable kernel auto update for RHEL 8/9 linux family
systemd: systemd:
name: kpatch.service name: kpatch.service
state: started state: started
enabled: yes enabled: yes
when: when:
- base_autoupdate | bool
- ansible_distribution == "RedHat" - ansible_distribution == "RedHat"
- ansible_distribution_major_version == '8' - ansible_distribution_major_version >= '8'
# - name: upgrade all packages # - name: upgrade all packages
# package: # package:
@ -203,6 +209,6 @@
- not hostsallow.stat.exists - not hostsallow.stat.exists
when: when:
- ansible_os_family == "RedHat" - ansible_os_family == "RedHat"
# - ansible_distribution_major_version < '8' - ansible_distribution_major_version < '9'
tags: tags:
- base - base

33
vars/RedHat_9.yml Normal file
View file

@ -0,0 +1,33 @@
---
base_packages:
- "@core"
- NetworkManager-team
- NetworkManager-bluetooth
- NetworkManager-wifi
- NetworkManager-wwan
# - aide
- bash-completion
- chrony
- device-mapper-event
- dmidecode
- firewalld
- kexec-tools
# - libcap-ng-utils
- pigz # epel
- patch
- pciutils
- python3-libselinux
- rng-tools
- rsync
- screen
- usbutils
- wget
- xz
- dnf-automatic
# - tcp_wrappers
base_packages_servers:
- "@^minimal-environment"
- NetworkManager-config-server
- NetworkManager-dispatcher-routing-rules
- iscsi-initiator-utils