fix(podman_host): restart systemd-logind if needed before enabling linger
This commit is contained in:
parent
d1d38d672a
commit
84e83df428
2 changed files with 11 additions and 0 deletions
6
roles/podman_host/handlers/main.yml
Normal file
6
roles/podman_host/handlers/main.yml
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: Restart systemd-logind
|
||||||
|
ansible.builtin.systemd_service:
|
||||||
|
name: systemd-logind
|
||||||
|
state: restarted
|
||||||
|
become: true
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ item }}"
|
become_user: "{{ item }}"
|
||||||
with_items: "{{ podman_host_rootless_users }}"
|
with_items: "{{ podman_host_rootless_users }}"
|
||||||
|
notify: Restart systemd-logind
|
||||||
|
|
||||||
- name: Podman Host | PATCH | Set XDG_RUNTIME_DIR in .bashrc for rootless users
|
- name: Podman Host | PATCH | Set XDG_RUNTIME_DIR in .bashrc for rootless users
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
|
|
@ -45,6 +46,10 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: "{{ item }}"
|
become_user: "{{ item }}"
|
||||||
with_items: "{{ podman_host_rootless_users }}"
|
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
|
- name: Podman Host | PATCH | Enable linger for rootless users
|
||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue