c12s-kubespray/roles/kernel-upgrade/tasks/centos-7.yml
Andrew Greenwood 756003a30e Cleanup legacy syntax, spacing, files all to yml
Migrate older inline= syntax to pure yml syntax for module args as to be consistant with most of the rest of the tasks
Cleanup some spacing in various files
Rename some files named yaml to yml for consistancy
2017-02-17 16:22:34 -05:00

33 lines
No EOL
680 B
YAML

---
- name: install ELRepo key
rpm_key:
state: present
key: '{{ elrepo_key_url }}'
- name: install elrepo repository
yum:
name: '{{elrepo_url}}'
state: present
- name: upgrade kernel
yum:
name: "{{elrepo_kernel_package}}"
state: present
enablerepo: elrepo-kernel
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