diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-08-20 12:20:28 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-08-20 12:20:28 +0300 |
commit | b6436165ac8bc529cc5c37bc3d7d55dd2c6cbb51 (patch) | |
tree | 456e23625fdc1bab12c6f9736c09aef024f28c0d | |
parent | 16313a63a382d7ac3991d1f7e75105fc05609582 (diff) | |
download | ansibleness-b6436165ac8bc529cc5c37bc3d7d55dd2c6cbb51.tar.gz |
add thinkpad role to exolobe1
Sponsored-by: author
-rw-r--r-- | ansible/exolobe1.yml | 2 | ||||
-rw-r--r-- | ansible/roles/thinkpad/files/tlp.conf | 16 | ||||
-rw-r--r-- | ansible/roles/thinkpad/tasks/main.yml | 14 |
3 files changed, 32 insertions, 0 deletions
diff --git a/ansible/exolobe1.yml b/ansible/exolobe1.yml index 765229c..2c7e346 100644 --- a/ansible/exolobe1.yml +++ b/ansible/exolobe1.yml @@ -50,6 +50,8 @@ tags: [env] - role: unix_users tags: [users] + - role: thinkpad + tags: [thinkpad] tasks: - apt: diff --git a/ansible/roles/thinkpad/files/tlp.conf b/ansible/roles/thinkpad/files/tlp.conf new file mode 100644 index 0000000..a9312f9 --- /dev/null +++ b/ansible/roles/thinkpad/files/tlp.conf @@ -0,0 +1,16 @@ +TLP_ENABLE=1 + +CPU_SCALING_GOVERNOR_ON_AC=powersave +CPU_SCALING_GOVERNOR_ON_BAT=powersave + +START_CHARGE_THRESH_BAT0=75 +STOP_CHARGE_THRESH_BAT0=80 + +START_CHARGE_THRESH_BAT1=75 +STOP_CHARGE_THRESH_BAT1=80 + +RESTORE_THRESHOLDS_ON_BAT=1 + +NATACPI_ENABLE=1 +TPACPI_ENABLE=1 +TPSMAPI_ENABLE=1 diff --git a/ansible/roles/thinkpad/tasks/main.yml b/ansible/roles/thinkpad/tasks/main.yml new file mode 100644 index 0000000..a118236 --- /dev/null +++ b/ansible/roles/thinkpad/tasks/main.yml @@ -0,0 +1,14 @@ +- name: "install software to manage Thinkpads" + apt: + name: + - tlp + +- name: "configure tlp to manage batteries" + copy: + src: tlp.conf + dest: /etc/tlp.d/50-debian-ansible.conf + +- name: "start tlp" + systemd: + name: tlp + state: restarted |