Ensure auto-cpufreq is also not installed. Only do the battery config if the device is listed as having a battery.
This commit is contained in:
@@ -9,23 +9,28 @@
|
|||||||
set_fact:
|
set_fact:
|
||||||
tlp: "tlp"
|
tlp: "tlp"
|
||||||
tlp_rdw: "tlp-rdw"
|
tlp_rdw: "tlp-rdw"
|
||||||
tlp_smart: "smartmontools"
|
tlp_extra: "smartmontools"
|
||||||
tlp_config: "/etc/tlp.conf"
|
tlp_config: "/etc/tlp.conf"
|
||||||
tlp_service: "tlp"
|
tlp_service: "tlp"
|
||||||
ppd_package: "power-profiles-daemon"
|
ppd_package: "power-profiles-daemon"
|
||||||
ppd_service: "power-profiles-daemon"
|
ppd_service: "power-profiles-daemon"
|
||||||
|
acf_package: "auto-cpufreq"
|
||||||
|
acf_service: "auto-cpufreq"
|
||||||
|
|
||||||
## Conflicts ##
|
## Conflicts ##
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | TLP | Conflicts | Disable
|
- name: Workstation | Linux | Software | TLP | Conflicts | Disable
|
||||||
service:
|
service:
|
||||||
name: "{{ ppd_package }}"
|
name: "{{ item }}"
|
||||||
state: stopped
|
state: stopped
|
||||||
enabled: false
|
enabled: false
|
||||||
|
loop:
|
||||||
|
- "{{ ppd_service }}"
|
||||||
|
- "{{ acf_service }}"
|
||||||
|
|
||||||
- name: Workstation | Linux | Software | TLP | Conflicts | Remove
|
- name: Workstation | Linux | Software | TLP | Conflicts | Remove
|
||||||
package:
|
package:
|
||||||
name: "{{ ppd_service }}"
|
name: "{{ ppd_package }} {{ acf_package }}"
|
||||||
state: absent
|
state: absent
|
||||||
|
|
||||||
## Install TLP + Associated Software ##
|
## Install TLP + Associated Software ##
|
||||||
@@ -61,10 +66,10 @@
|
|||||||
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_AC', "value": '#DEVICES_TO_ENABLE_ON_AC=""'}
|
- { "key": '^[\#]?DEVICES_TO_ENABLE_ON_AC', "value": '#DEVICES_TO_ENABLE_ON_AC=""'}
|
||||||
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_BAT', "value": '#DEVICES_TO_DISABLE_ON_BAT=""'}
|
- { "key": '^[\#]?DEVICES_TO_DISABLE_ON_BAT', "value": '#DEVICES_TO_DISABLE_ON_BAT=""'}
|
||||||
# Help preserve battery life by not fully charging. #
|
# Help preserve battery life by not fully charging. #
|
||||||
- { "key": '^[\#]?START_CHARGE_THRESH_BAT0', "value": 'START_CHARGE_THRESH_BAT0=75'}
|
- { "key": '^[\#]?START_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT0=75'}
|
||||||
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": 'STOP_CHARGE_THRESH_BAT0=80'}
|
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT0', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT0=80'}
|
||||||
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": 'START_CHARGE_THRESH_BAT1=75'}
|
- { "key": '^[\#]?START_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}START_CHARGE_THRESH_BAT1=75'}
|
||||||
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": 'STOP_CHARGE_THRESH_BAT1=80'}
|
- { "key": '^[\#]?STOP_CHARGE_THRESH_BAT1', "value": '{{ "" if battery else "#" }}STOP_CHARGE_THRESH_BAT1=80'}
|
||||||
|
|
||||||
## Enable + Start ##
|
## Enable + Start ##
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user