Correctly configure sleep and hibernation

This commit is contained in:
Oliver Traber 2025-08-06 10:40:02 +02:00
parent cfd2b9be69
commit 142ccb8815
Signed by: Bluemedia
GPG key ID: C0674B105057136C
4 changed files with 22 additions and 1 deletions

View file

@ -23,6 +23,18 @@
- "/usr/bin/systemctl reboot"
- "/usr/bin/systemctl suspend"
- name: Copy sleep and hibernation config drop-ins for systemd on mobile platforms
become: yes
copy:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
loop:
- src: "{{ role_path }}/files/systemd/logind.conf.d"
dest: "/etc/systemd/"
- src: "{{ role_path }}/files/systemd/sleep.conf.d"
dest: "/etc/systemd/"
when: hostvars[ansible_hostname]['mobile_platform']
- name: Copy static config files
copy:
src: "{{ item.src }}"
@ -34,6 +46,10 @@
dest: "{{ ansible_env.HOME }}/"
- src: "{{ role_path }}/files/.zshrc"
dest: "{{ ansible_env.HOME }}/"
- src: "{{ role_path }}/files/systemd/logind.conf.d"
dest: "/etc/systemd/"
- src: "{{ role_path }}/files/systemd/sleep.conf.d"
dest: "/etc/systemd/"
- name: Ensure presence of required directories
file: