Add laptop power saving conf

This commit is contained in:
Sonny Bakker 2020-12-05 10:36:33 +01:00
parent d1154ef254
commit a101d6c0e3
4 changed files with 30 additions and 3 deletions

View file

@ -43,3 +43,11 @@
state: restarted
enabled: true
scope: user
- name: restart powertop
become: yes
systemd:
name: powertop
state: restarted
enabled: true
daemon-reload: true

View file

@ -42,9 +42,16 @@
state: touch
mode: "0644"
# TODO
# - laptop power saving configuration
# - laptop pacman specific configuration
- name: copy powertop service
become: yes
template:
src: "{{ platform }}/powertop.j2"
dest: "/etc/systemd/system/powertop.service"
owner: root
group: root
mode: "0644"
notify: restart powertop
when: platform == "laptop"
- include_tasks: systemd.yml
- include_tasks: gpg.yml # TODO

View file

@ -0,0 +1,11 @@
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
[Unit]
Description=Powertop tunings
[Service]
ExecStart=/usr/bin/powertop --auto-tune
RemainAfterExit=true
[Install]
WantedBy=multi-user.target

View file

@ -1,2 +1,3 @@
platform_packages:
- iwd
- powertop