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.

32 lines
680 B

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