tlp, add tasks to enable TLP on Devuan using runit.
This commit is contained in:
@@ -106,10 +106,32 @@
|
|||||||
enabled: true
|
enabled: true
|
||||||
when: ansible_service_mgr not in ("runit")
|
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: |
|
shell: |
|
||||||
if [[ ! -e {{ runit_service_dir }}/tlp ]]; then
|
if [[ ! -e {{ runit_service_dir }}/{{ tlp_service }} ]]; then
|
||||||
ln -s {{ runit_script_dir }}/tlp {{ runit_service_dir }}/tlp
|
ln -s {{ runit_script_dir }}/{{ tlp_service }} {{ runit_service_dir }}/
|
||||||
fi
|
fi
|
||||||
when: ansible_service_mgr == "runit"
|
when: ansible_service_mgr == "runit"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user