|
|
|
@ -72,18 +72,15 @@
|
|
|
|
|
- reboot
|
|
|
|
|
when: ansible_system_vendor != "QEMU"
|
|
|
|
|
|
|
|
|
|
- name: Check if CPU is Intel
|
|
|
|
|
shell: grep -c AMD /proc/cpuinfo
|
|
|
|
|
register: intel_check
|
|
|
|
|
|
|
|
|
|
- name: Disable the kernel's CPU mitigations
|
|
|
|
|
tasks:
|
|
|
|
|
- name: Check if CPU is Intel
|
|
|
|
|
shell: grep -c AMD /proc/cpuinfo
|
|
|
|
|
register: intel_check
|
|
|
|
|
|
|
|
|
|
- name: Install grub config with mitigations off
|
|
|
|
|
copy:
|
|
|
|
|
src: grub-mitigations.conf
|
|
|
|
|
dest: /etc/sysconfig/grub
|
|
|
|
|
mode: 0644
|
|
|
|
|
notify:
|
|
|
|
|
- reboot
|
|
|
|
|
when: intel_check.stdout != "0"
|
|
|
|
|
- name: Install grub config to disable CPU mitigations
|
|
|
|
|
copy:
|
|
|
|
|
src: grub-mitigations.conf
|
|
|
|
|
dest: /etc/sysconfig/grub
|
|
|
|
|
mode: 0644
|
|
|
|
|
notify:
|
|
|
|
|
- reboot
|
|
|
|
|
when: intel_check.stdout != "0"
|
|
|
|
|