2017-01-10 15:11:42 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
- name: install ELRepo key
|
2017-02-17 21:22:34 +00:00
|
|
|
rpm_key:
|
|
|
|
state: present
|
|
|
|
key: '{{ elrepo_key_url }}'
|
2017-01-10 15:11:42 +00:00
|
|
|
|
|
|
|
- name: install elrepo repository
|
|
|
|
yum:
|
|
|
|
name: '{{elrepo_url}}'
|
|
|
|
state: present
|
|
|
|
|
|
|
|
- name: upgrade kernel
|
2017-02-17 21:22:34 +00:00
|
|
|
yum:
|
|
|
|
name: "{{elrepo_kernel_package}}"
|
|
|
|
state: present
|
|
|
|
enablerepo: elrepo-kernel
|
2017-01-10 15:11:42 +00:00
|
|
|
register: upgrade
|
|
|
|
|
|
|
|
- name: change default grub entry
|
|
|
|
lineinfile:
|
|
|
|
dest: '/etc/default/grub'
|
|
|
|
regexp: '^GRUB_DEFAULT=.*'
|
|
|
|
line: 'GRUB_DEFAULT=0'
|
|
|
|
when: upgrade.changed
|
|
|
|
register: grub_entry
|
|
|
|
|
|
|
|
- name: re-generate grub-config
|
|
|
|
command: grub2-mkconfig -o /boot/grub2/grub.cfg
|
|
|
|
when: upgrade.changed and grub_entry.changed
|
|
|
|
|
|
|
|
- include: reboot.yml
|
|
|
|
when: upgrade.changed
|