-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pve: Add support for installing microcode (#138)
* add microcode install to pve role * fix non-free template expression
- Loading branch information
Showing
12 changed files
with
114 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,26 @@ | ||
- name: update initramfs | ||
command: update-initramfs -u -k all | ||
|
||
- name: reboot host to enable vifo kernel modules | ||
ansible.builtin.reboot: | ||
# These wrapper handlers are needed to ensure that we only reboot when allowed, and only reboot once | ||
- name: reboot host to enable pcie passthrough | ||
ansible.builtin.debug: | ||
msg: "Rebooting host to enable pice passthrough" | ||
changed_when: true | ||
notify: _reboot host | ||
when: pve_pcie_reboot_for_kernel | ||
|
||
- name: reboot host to update microcode | ||
ansible.builtin.debug: | ||
msg: "Rebooting host to update microcode" | ||
changed_when: true | ||
notify: _reboot host | ||
when: pve_reboot_for_ucode | ||
|
||
- name: _reboot host | ||
ansible.builtin.reboot: | ||
reboot_timeout: 900 | ||
|
||
- name: restart cpu-governor service | ||
ansible.builtin.systemd: | ||
name: cpu-governor.service | ||
state: restarted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
- name: deb repository configuration is present | ||
ansible.builtin.template: | ||
src: templates/sources.list.j2 | ||
dest: /etc/apt/sources.list | ||
owner: root | ||
group: root | ||
mode: "644" | ||
|
||
- name: Microcode package is installed | ||
ansible.builtin.apt: | ||
name: "{{ pve_ucode_package[ansible_processor[1]] }}" | ||
update_cache: yes | ||
notify: reboot host to update microcode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[Unit] | ||
Description=Adjust CPU governor after boot | ||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/cpupower -c all frequency-set -g {{ pve_cpu_governor }} | ||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# {{ ansible_managed }} | ||
|
||
deb http://deb.debian.org/debian {{ ansible_distribution_release }} main contrib {{ pve_non_free_firmware_text }} | ||
deb-src http://deb.debian.org/debian {{ ansible_distribution_release }} main contrib {{ pve_non_free_firmware_text }} | ||
|
||
deb http://deb.debian.org/debian-security/ {{ ansible_distribution_release }}-security main contrib {{ pve_non_free_firmware_text }} | ||
deb-src http://deb.debian.org/debian-security/ {{ ansible_distribution_release }}-security main contrib {{ pve_non_free_firmware_text }} | ||
|
||
deb http://deb.debian.org/debian {{ ansible_distribution_release }}-updates main contrib {{ pve_non_free_firmware_text }} | ||
deb-src http://deb.debian.org/debian {{ ansible_distribution_release }}-updates main contrib {{ pve_non_free_firmware_text }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters