From b37396fa75f8ea0872195144303eacb481ee1029 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Wed, 26 Oct 2022 01:25:32 +0200 Subject: [PATCH] Reload udev rules --- roles/laptop/tasks/main.yml | 3 +++ roles/laptop/tasks/powersave.yml | 7 +++++++ 2 files changed, 10 insertions(+) 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