- name: elrepo-release
  become: true
  yum:
    update_cache: yes
    name: epel-release,elrepo-release
- name: yum plugin
  become: true
  yum:
    update_cache: yes
    name: yum-plugin-elrepo
- name: install kernel
  become: true
  yum:
    update_cache: yes
    state: latest
    name: kernel-ml,kernel-ml-devel,kernel-ml-headers
    enablerepo: elrepo-kernel
- name: remove wireguard-dkms
  become: true
  yum:
    name: kmod-wireguard,wireguard-dkms
    state: absent
- name: change grub
  become: true
  lineinfile:
    path: /etc/default/grub
    regexp: '^GRUB_DEFAULT='
    line: 'GRUB_DEFAULT=0'
    backrefs: true
  register: change_grub_result
- name: make grub config
  when: change_grub_result.changed
  become: true
  shell: grub2-mkconfig -o /boot/grub2/grub.cfg
