dotfiles/tasks/power-saving.yml

53 lines
1.1 KiB
YAML
Raw Normal View History

2018-09-14 09:48:18 +01:00
- name: "Install power-saving stuff"
aur:
skip_installed: true
name: "{{ item }}"
become: true
become_user: aur_builder
2019-03-14 21:34:29 +00:00
when: "item not in installed_packages.stdout_lines"
2018-09-14 09:48:18 +01:00
with_items:
2019-03-14 21:34:29 +00:00
- 'acpi'
2018-09-14 09:48:18 +01:00
- ethtool
2019-03-14 22:09:46 +00:00
- nbfc
2019-03-14 21:34:29 +00:00
- 'powertop'
- 'psensor'
2018-09-14 09:48:18 +01:00
- smartmontools
2019-03-14 21:34:29 +00:00
- 'sysstat'
2018-09-14 09:48:18 +01:00
- tlp
- xfce4-power-manager
2018-09-14 09:48:18 +01:00
- name: Enable TLP services
2019-05-26 11:52:41 +01:00
systemd:
2018-09-14 09:48:18 +01:00
name: "{{ item }}"
enabled: true
2019-05-26 11:52:41 +01:00
state: started
2018-09-14 09:48:18 +01:00
with_items:
- tlp
- tlp-sleep
2019-03-14 22:09:46 +00:00
- name: Enable NBFC
2019-05-26 11:52:41 +01:00
systemd:
2019-03-14 22:09:46 +00:00
name: nbfc
enabled: true
2019-05-26 11:52:41 +01:00
state: started
2019-03-14 22:09:46 +00:00
2019-05-25 16:50:09 +01:00
- name: Install TLP config
copy:
2018-09-14 09:48:18 +01:00
src: ./files/tlp.conf
dest: /etc/default/tlp
mode: 0644
2019-05-26 12:11:26 +01:00
- name: "Create XFCE4 power manager config directory"
file:
path: '{{ home }}/.config/xfce4/xfconf/xfce-perchannel-xml'
state: directory
owner: "{{ user }}"
mode: 0755
2019-05-26 12:11:26 +01:00
- name: Install XFCE4 power manager config
copy:
src: ./files/xfce4-power-manager.xml
dest: "{{ home }}/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-power-manager.xml"
owner: "{{ user }}"
mode: 0644