ansible-desktop/roles/laptop/tasks/powersave.yml

32 lines
609 B
YAML
Raw Normal View History

2022-10-25 23:18:13 +00:00
- name: install required packages for script
become: yes
apt:
update_cache: yes
pkg:
- linux-tools-common
- linux-tools-generic
- name: copy scripts
become: yes
copy:
src: "usr/local/sbin/{{item}}"
dest: "/usr/local/sbin/{{item}}"
mode: '0755'
loop:
- power-saver-mode
- unlimited-power
- name: add udev rules
become: yes
copy:
src: etc/udev/rules.d/99-powersave.rules
dest: /etc/udev/rules.d/99-powersave.rules
mode: '0755'
2022-10-25 23:25:32 +00:00
- name: 'reload udev rules'
become: yes
shell:
cmd: |
udevadm control --reload
udevadm trigger