Implement shutdown-if-not-in-use.

This commit is contained in:
Andreas B. Mundt 2023-08-06 13:51:16 +02:00
parent f1c67852da
commit 9f6fa677c4
5 changed files with 84 additions and 0 deletions

View file

@ -137,6 +137,23 @@
AllowSuspendThenHibernate=no
AllowHybridSleep=no
- Name: Copy pwroff script
template:
src: pwroff
dest: /usr/local/sbin/
mode: 0755
- name: Provide service and timer for pwroff script
copy:
src: "{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
mode: 0644
with_items:
- pwroff.service
- pwroff.timer
notify: enable pwroff.timer
################# general settings ##################
- name: Protect grub menu entries
blockinfile: