diff --git a/roles/k3s/tasks/raspberrypi.yml b/roles/k3s/tasks/raspberrypi.yml index a1a73b4..2537617 100644 --- a/roles/k3s/tasks/raspberrypi.yml +++ b/roles/k3s/tasks/raspberrypi.yml @@ -16,6 +16,8 @@ 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 @@ -24,4 +26,29 @@ backrefs: true regexp: '^(.+ rootwait).*$' 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