Shitty IaC
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

ansible: setup powertop with autotune

Gee Sawra 255673fc dbc3a97c

+33
+33
ansible/1_setup.yml
··· 98 98 state: present 99 99 src: k8s/traefik_porkbun.yml 100 100 101 + - name: Setup PowerTop 102 + hosts: all 103 + tags: powertop 104 + gather_facts: true 105 + become: true 106 + tasks: 107 + - name: Install the latest version of Powertop 108 + ansible.builtin.dnf: 109 + name: powertop 110 + state: latest 111 + 112 + - name: Write systemd unit 113 + copy: 114 + dest: /etc/systemd/system/powertop.service 115 + content: | 116 + [Unit] 117 + Description=Powertop tunings 118 + 119 + [Service] 120 + Type=oneshot 121 + RemainAfterExit=yes 122 + ExecStart=/usr/sbin/powertop --auto-tune 123 + ExecStartPost=/bin/bash -c "for f in $(find /sys/bus/usb/drivers/usbhid -regex '.*\\/[0-9:.-]+' -printf '%%f\\n' | cut -d ':' -f 1 | sort -u); do echo on >| \"/sys/bus/usb/devices/$f/power/control\"; done" 124 + 125 + [Install] 126 + WantedBy=multi-user.target sleep.target 127 + 128 + - name: Systemctl daemon-reload 129 + ansible.builtin.systemd: 130 + state: restarted 131 + daemon_reload: true 132 + name: powertop 133 + 101 134 - name: Harden Log Rotation for K3s and Systemd 102 135 hosts: all 103 136 become: true