diff --git a/hosts b/hosts index 12157a9..aa01d67 100644 --- a/hosts +++ b/hosts @@ -31,6 +31,8 @@ all: hosts: router-0: ansible_host: 192.168.10.10 + server-0: + ansible_host: 192.168.10.11 # vars: # ansible_user: root lb: diff --git a/playbook.yml b/playbook.yml index 9700e78..43d6e75 100644 --- a/playbook.yml +++ b/playbook.yml @@ -1,3 +1,7 @@ +- hosts: proxmox + roles: + - proxmox + - hosts: debian roles: - common @@ -6,10 +10,6 @@ roles: - haproxy -- hosts: proxmox - roles: - - proxmox - - hosts: k3s-server roles: - k3s-server diff --git a/roles/k3s/files/50-rpi-fan.rules b/roles/k3s/files/50-rpi-fan.rules new file mode 100644 index 0000000..ebb5749 --- /dev/null +++ b/roles/k3s/files/50-rpi-fan.rules @@ -0,0 +1,18 @@ +SUBSYSTEM=="thermal" +KERNEL=="thermal_zone0" + +# If the temp hits 75c, turn on the fan. Turn it off again when it goes back down to 70. +ATTR{trip_point_3_temp}="75000" +ATTR{trip_point_3_hyst}="5000" +# +# If the temp hits 78c, higher RPM. +ATTR{trip_point_2_temp}="78000" +ATTR{trip_point_2_hyst}="2000" +# +# If the temp hits 80c, higher RPM. +ATTR{trip_point_1_temp}="80000" +ATTR{trip_point_1_hyst}="2000" +# +# If the temp hits 81c, highest RPM. +ATTR{trip_point_0_temp}="81000" +ATTR{trip_point_0_hyst}="5000" \ No newline at end of file diff --git a/roles/k3s/tasks/main.yml b/roles/k3s/tasks/main.yml index 3c4dd9a..fc4a8bb 100644 --- a/roles/k3s/tasks/main.yml +++ b/roles/k3s/tasks/main.yml @@ -7,6 +7,12 @@ group: root mode: 0755 +- name: Configure poe hat fan speed control udev rules + copy: + src: 50-rpi-fan.rules + dest: /etc/udev/rules.d/50-rpi-fan.rules + notify: reboot + - name: Enable cgroups copy: src: cmdline.txt diff --git a/roles/proxmox/files/pve-no-subscription.list b/roles/proxmox/files/pve-no-subscription.list index 77243c9..91808ec 100644 --- a/roles/proxmox/files/pve-no-subscription.list +++ b/roles/proxmox/files/pve-no-subscription.list @@ -1,2 +1 @@ deb http://download.proxmox.com/debian/pve bullseye pve-no-subscription -