terraform-k8s/roles/kubernetes/tasks/update_kernel.yml

33 lines
991 B
YAML

---
######################
#### KERNEL TASKS ####
######################
# TODO: get rid of inline http_proxy and fetch repo with the yum-repository ansible module
- name: import elrepo gpg key
shell: rpm -httpproxy http://[2001:470:6d:22c::1]:3128 --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
- name: enable elrepo-release rpm
shell: rpm -httpproxy http://[2001:470:6d:22c::1]:3128 -Uvh http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
# - name: Add repository
# yum_repository:
# name: elrepo-kernel
# description: elrepo-release
# baseurl: http://www.elrepo.org/elrepo-release-7.0-3.el7.elrepo.noarch.rpm
- name: install mainline kernel
shell: yum --enablerepo=elrepo-kernel install kernel-ml -y
- name: set default kernel version in grub
lineinfile:
dest: /etc/default/grub
regexp: "^GRUB_DEFAULT"
line: "GRUB_DEFAULT=0"
- name: write grub config
shell: grub2-mkconfig -o /boot/grub2/grub.cfg
- name: reboot
reboot: