1
0
Fork 0

config for rpi poe fan ubuntu

This commit is contained in:
Massaki Archambault 2025-02-12 19:53:42 -05:00
parent e0895dd6c3
commit 1662a525ee
1 changed files with 27 additions and 0 deletions

View File

@ -16,6 +16,8 @@
dtparam=poe_fan_temp1=70000 dtparam=poe_fan_temp1=70000
dtparam=poe_fan_temp2=75000 dtparam=poe_fan_temp2=75000
dtparam=poe_fan_temp3=80000 dtparam=poe_fan_temp3=80000
when:
- ansible_facts['distribution'] != "Ubuntu"
notify: reboot notify: reboot
- name: Enable cgroup memory - name: Enable cgroup memory
@ -24,4 +26,29 @@
backrefs: true backrefs: true
regexp: '^(.+ rootwait).*$' regexp: '^(.+ rootwait).*$'
line: '\1 cgroup_memory=1 cgroup_enable=memory' line: '\1 cgroup_memory=1 cgroup_enable=memory'
when:
- ansible_facts['distribution'] != "Ubuntu"
notify: reboot
# Ubuntu hold these files in a different place
- name: Configure poe hat fan speed control
blockinfile:
path: /boot/firmware/config.txt
block: |
dtparam=poe_fan_temp0=65000
dtparam=poe_fan_temp1=70000
dtparam=poe_fan_temp2=75000
dtparam=poe_fan_temp3=80000
when:
- ansible_facts['distribution'] == "Ubuntu"
notify: reboot
- name: Enable cgroup memory
lineinfile:
path: /boot/firmware/cmdline.txt
backrefs: true
regexp: '^(.+ rootwait).*$'
line: '\1 cgroup_memory=1 cgroup_enable=memory'
when:
- ansible_facts['distribution'] == "Ubuntu"
notify: reboot notify: reboot