From 5ca4fbf2cfe781efedc7c078acaa826c6ad39b10 Mon Sep 17 00:00:00 2001 From: spmfox Date: Tue, 27 Aug 2024 17:34:55 -0400 Subject: converting to roles, converting from runlabels to quadlet ~ breaking change --- roles/host/tasks/linger.yml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 roles/host/tasks/linger.yml (limited to 'roles/host/tasks/linger.yml') diff --git a/roles/host/tasks/linger.yml b/roles/host/tasks/linger.yml new file mode 100644 index 0000000..dffc6a7 --- /dev/null +++ b/roles/host/tasks/linger.yml @@ -0,0 +1,8 @@ +- name: Confirm systemd-linger is set for containers user + ansible.builtin.stat: + path: "/var/lib/systemd/linger/{{ host_containers_user }}" + register: linger + +- name: Set systemd-linger for containers user (if necessary) + ansible.builtin.shell: "loginctl enable-linger {{ host_containers_user }}" + when: not linger.stat.exists -- cgit