kvm: correct syntax for task

Ansible doesn't want another task list here, so we just put the CPU
mitigation steps as their own individual tasks.
master
Devan Carpenter 2 years ago
parent 4563441c63
commit 85f834f297
Signed by: dvn
GPG Key ID: E1707CFFD7B85A02

@ -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"

Loading…
Cancel
Save