tlp, attempt to automate enabling with runit.

This commit is contained in:
2026-08-02 12:28:24 -07:00
parent fa732599fe
commit b051bce767
2 changed files with 21 additions and 3 deletions
+9 -3
View File
@@ -12,6 +12,8 @@
git_repo_ssh: ssh://git@{{ git_host }}:{{ git_ssh_port }}/{{ git_user }}/{{ git_project }} git_repo_ssh: ssh://git@{{ git_host }}:{{ git_ssh_port }}/{{ git_user }}/{{ git_project }}
shared_rc_install_dir: ~/.git-env-shared shared_rc_install_dir: ~/.git-env-shared
notify_log: "ansible.notify.log" notify_log: "ansible.notify.log"
runit_script_dir: /etc/runit/sv
runit_service_dir: /etc/runit/runsvdir/default
- name: General | Facts | System | Global [2/2] - name: General | Facts | System | Global [2/2]
set_fact: set_fact:
@@ -27,7 +29,6 @@
shutdown_command: sudo shutdown -h now shutdown_command: sudo shutdown -h now
when: ansible_system == "Linux" when: ansible_system == "Linux"
- name: General | Facts | System | FreeBSD - name: General | Facts | System | FreeBSD
set_fact: set_fact:
rc_conf: /etc/rc.conf rc_conf: /etc/rc.conf
@@ -35,14 +36,19 @@
shutdown_command: sudo shutdown -p now shutdown_command: sudo shutdown -p now
when: ansible_system == "FreeBSD" when: ansible_system == "FreeBSD"
- name: General | Facts | System | Report File Names - name: General | Facts | System | Report File Names
set_fact: set_fact:
lynis_report: "lynis_hardness_check.txt" lynis_report: "lynis_hardness_check.txt"
nmap_report: "nmap_port_check.txt" nmap_report: "nmap_port_check.txt"
- name: General | Facts | System | Ansible Branch - name: General | Facts | System | Ansible Branch
set_fact: set_fact:
branch: main branch: main
when: branch is not defined when: branch is not defined
- name: General | Facts | System | runit (Devuan)
set_fact:
runit_script_dir: /etc/sv
runit_service_dir: /etc/services
when: ansible_pkg_mgr == "apt"
+12
View File
@@ -20,6 +20,7 @@
- name: Workstation | Linux | Software | TLP | Facts (Artix) - name: Workstation | Linux | Software | TLP | Facts (Artix)
set_fact: set_fact:
ppd_package: "power-profiles-daemon power-profiles-daemon-runit" ppd_package: "power-profiles-daemon power-profiles-daemon-runit"
tlp: tlp tlp-runit
when: ansible_pkg_mgr == "pacman" when: ansible_pkg_mgr == "pacman"
and ansible_service_mgr == "runit" and ansible_service_mgr == "runit"
@@ -52,6 +53,17 @@
- "{{ tlp_smart }}" - "{{ tlp_smart }}"
update_cache: yes update_cache: yes
- name: Workstation | Linux | Software | TLP | Enable
service:
name: tlp
state: started
enabled: yes
when: ansible_service_mgr not in ("runit")
- name: Workstation | Linux | Software | TLP | Enable (runit, Artix)
shell: "ln -s {{runit_script_dir }}/tlp {{ runit_service_dir }}/tlp"
when: ansible_service_mgr == "runit"
## Configuration ## ## Configuration ##
# Device choices: # Device choices: