Use variables in the TLP configuration.
This commit is contained in:
@@ -3,24 +3,36 @@
|
|||||||
# Attempt to save battery life by having a daemon tune the CPU and disable
|
# Attempt to save battery life by having a daemon tune the CPU and disable
|
||||||
# unneeded components like USB, Bluetooth, WiFi, etc when not in use.
|
# unneeded components like USB, Bluetooth, WiFi, etc when not in use.
|
||||||
|
|
||||||
|
## Variables ##
|
||||||
|
|
||||||
|
- name: Workstation | Linux | Software | TLP | Facts
|
||||||
|
set_fact:
|
||||||
|
tlp: "tlp"
|
||||||
|
tlp_rdw: "tlp-rdw"
|
||||||
|
tlp_smart: "smartmontools"
|
||||||
|
tlp_config: "/etc/tlp.conf"
|
||||||
|
tlp_service: "tlp"
|
||||||
|
ppd_package: "power-profiles-daemon"
|
||||||
|
ppd_service: "power-profiles-daemon"
|
||||||
|
|
||||||
## Conflicts ##
|
## Conflicts ##
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | TLP | Conflicts | Disable
|
- name: Workstation | Linux | Software | TLP | Conflicts | Disable
|
||||||
service:
|
service:
|
||||||
name: power-profiles-daemon
|
name: "{{ ppd_package }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: false
|
enabled: false
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | TLP | Conflicts | Remove
|
- name: Workstation | Linux | Software | TLP | Conflicts | Remove
|
||||||
package:
|
package:
|
||||||
name: power-profiles-daemon
|
name: "{{ ppd_service }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
## Install TLP + Associated Software ##
|
## Install TLP + Associated Software ##
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | TLP | Install
|
- name: Workstation | Linux | Software | TLP | Install
|
||||||
package:
|
package:
|
||||||
name: tlp tlp-rdw smartmontools
|
name: "{{ tlp }} {{ tlp_rdw }} {{ tlp_smart }}"
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
## Configuration ##
|
## Configuration ##
|
||||||
@@ -60,6 +72,6 @@
|
|||||||
|
|
||||||
- name: Workstation | Linux | Software | TLP | Enable + Start
|
- name: Workstation | Linux | Software | TLP | Enable + Start
|
||||||
service:
|
service:
|
||||||
name: tlp
|
name: "{{ tlp_service }}"
|
||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user