Add kpatch
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adrien Reslinger 2021-10-09 18:59:40 +02:00
parent fd45cae3f0
commit 850d8135f6
Signed by: adrien
GPG key ID: DA7B27055C66D6DE
2 changed files with 36 additions and 0 deletions

View file

@ -0,0 +1,2 @@
[main]
autoupdate = True

View file

@ -109,6 +109,40 @@
- ansible_os_family == "RedHat"
- 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
- name: Install kpatch packages on RedHat Enterprise Linux 8
package:
name:
- kpatch
- kpatch-dnf
- kpatch-patch
- "kpatch-patch = {{ ansible_kernel }}"
update_cache: yes
state: present
when:
- ansible_distribution == "RedHat"
- ansible_distribution_major_version == '8'
- name: "Configure kernel auto update for RedHat Enterprise Linux 8"
copy:
src: etc/dnf/plugins/kpatch.conf
dest: /etc/dnf/plugins/kpatch.conf
owner: root
group: root
mode: 0644
when:
- ansible_distribution == "RedHat"
- ansible_distribution_major_version == '8'
- name: enable kernel auto update for RHEL 8 linux family
systemd:
name: kpatch.service
state: started
enabled: yes
when:
- ansible_distribution == "RedHat"
- ansible_distribution_major_version == '8'
# - name: upgrade all packages
# package:
# name: "*"