fix(podman_host): restart systemd-logind if needed before enabling linger

This commit is contained in:
Iain Learmonth 2025-12-22 11:05:58 +00:00
parent d1d38d672a
commit 84e83df428
2 changed files with 11 additions and 0 deletions

View file

@ -0,0 +1,6 @@
---
- name: Restart systemd-logind
ansible.builtin.systemd_service:
name: systemd-logind
state: restarted
become: true

View file

@ -37,6 +37,7 @@
become: true
become_user: "{{ item }}"
with_items: "{{ podman_host_rootless_users }}"
notify: Restart systemd-logind
- name: Podman Host | PATCH | Set XDG_RUNTIME_DIR in .bashrc for rootless users
ansible.builtin.lineinfile:
@ -45,6 +46,10 @@
become: true
become_user: "{{ item }}"
with_items: "{{ podman_host_rootless_users }}"
notify: Restart systemd-logind
- name: Podman Host | Flush handlers
ansible.builtin.meta: flush_handlers
- name: Podman Host | PATCH | Enable linger for rootless users
ansible.builtin.command: