tlp, add tasks to enable TLP on Devuan using runit.

This commit is contained in:
2026-08-11 11:06:35 -07:00
parent 60e685529d
commit c481b74b5d
+25 -3
View File
@@ -106,10 +106,32 @@
enabled: true
when: ansible_service_mgr not in ("runit")
- name: Workstation | Linux | Software | TLP | Enable + Start (runit)
- name: Workstation | Linux | Software | TLP | runit | Devuan Block
block:
- name: Workstation | Linux | Software | TLP | runit | Devuan | Facts 01
set_fact:
devuan_tlp_dir: "{{ runit_script_dir }}/{{ tlp_service }}"
- name: Workstation | Linux | Software | TLP | runit | Devuan | Facts 02
set_fact:
devuan_tlp_run: "{{ devuan_tlp_dir }}/run"
- name: Workstation | Linux | Software | TLP | runit | Devuan | Create Script
shell: "{{ item }}"
loop:
- "mkdir -pv {{ devuan_tlp_dir }}"
- "echo '#!/bin/sh' > {{ devuan_tlp_run }}"
- "echo 'exec /usr/sbin/{{ tlp_service }} start' >> {{ devuan_tlp_run }}"
- "chmod +x {{ devuan_tlp_run }}"
when: ansible_service_mgr == "runit"
and ansible_pkg_mgr == "apt"
- name: Workstation | Linux | Software | TLP | runit | Enable + Start
shell: |
if [[ ! -e {{ runit_service_dir }}/tlp ]]; then
ln -s {{ runit_script_dir }}/tlp {{ runit_service_dir }}/tlp
if [[ ! -e {{ runit_service_dir }}/{{ tlp_service }} ]]; then
ln -s {{ runit_script_dir }}/{{ tlp_service }} {{ runit_service_dir }}/
fi
when: ansible_service_mgr == "runit"