mirror of
https://github.com/pigmonkey/spark.git
synced 2026-07-18 00:46:47 +00:00
28 lines
687 B
YAML
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
|