This commit is contained in:
parent
fd45cae3f0
commit
850d8135f6
2 changed files with 36 additions and 0 deletions
2
files/etc/dnf/plugins/kpatch.conf
Normal file
2
files/etc/dnf/plugins/kpatch.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[main]
|
||||||
|
autoupdate = True
|
||||||
|
|
@ -109,6 +109,40 @@
|
||||||
- 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
|
||||||
|
- 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
|
# - name: upgrade all packages
|
||||||
# package:
|
# package:
|
||||||
# name: "*"
|
# name: "*"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue