diff --git a/roles/laptop/tasks/main.yml b/roles/laptop/tasks/main.yml index cf3250e..556ffd3 100644 --- a/roles/laptop/tasks/main.yml +++ b/roles/laptop/tasks/main.yml @@ -3,6 +3,9 @@ path: /sys/class/power_supply/BAT0/charge_control_end_threshold register: battery_limiter_available +- name: Powersave tasks + import_tasks: powersave.yml + - when: battery_limiter_available.stat.exists block: - import_tasks: battery.yml diff --git a/roles/laptop/tasks/powersave.yml b/roles/laptop/tasks/powersave.yml index 01bcc64..4bc01ef 100644 --- a/roles/laptop/tasks/powersave.yml +++ b/roles/laptop/tasks/powersave.yml @@ -22,3 +22,10 @@ src: etc/udev/rules.d/99-powersave.rules dest: /etc/udev/rules.d/99-powersave.rules mode: '0755' + +- name: 'reload udev rules' + become: yes + shell: + cmd: | + udevadm control --reload + udevadm trigger