spark/roles/microcode/tasks/main.yml
2026-04-10 15:49:13 -07:00

28 lines
687 B
YAML

---
- name: Check if Intel processor
ansible.builtin.command: grep -q Intel /proc/cpuinfo
register: microcode_is_intel
changed_when: false
failed_when: microcode_is_intel.rc > 1
- name: Check if AMD processor
ansible.builtin.command: grep -q AMD /proc/cpuinfo
register: microcode_is_amd
changed_when: false
failed_when: microcode_is_amd.rc > 1
- name: Install Intel microcode
community.general.pacman:
name: intel-ucode
state: present
when: microcode_is_intel.rc == 0
notify:
- Rebuild grub
- name: Install AMD microcode
community.general.pacman:
name: amd-ucode
state: present
when: microcode_is_amd.rc == 0
notify:
- Rebuild grub