You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
653 B

  1. ---
  2. - name: install ELRepo key
  3. rpm_key: state=present key='{{ elrepo_key_url }}'
  4. - name: install elrepo repository
  5. yum:
  6. name: '{{elrepo_url}}'
  7. state: present
  8. - name: upgrade kernel
  9. yum: name={{elrepo_kernel_package}} state=present enablerepo=elrepo-kernel
  10. register: upgrade
  11. - name: change default grub entry
  12. lineinfile:
  13. dest: '/etc/default/grub'
  14. regexp: '^GRUB_DEFAULT=.*'
  15. line: 'GRUB_DEFAULT=0'
  16. when: upgrade.changed
  17. register: grub_entry
  18. - name: re-generate grub-config
  19. command: grub2-mkconfig -o /boot/grub2/grub.cfg
  20. when: upgrade.changed and grub_entry.changed
  21. - include: reboot.yml
  22. when: upgrade.changed