{% set user = salt['pillar.get']('podman:user', 'root') %}
Install packages needed for podman:
pkg.installed:
- pkgs:
- podman
Set linger for user {{ user }}:
cmd.run:
- name: loginctl enable-linger {{ user }}
- unless: test -e /var/lib/systemd/linger/{{ user }}
{% if pillar.containers is defined %}
include:
{%- for container, args in pillar.containers.items() %}
- podman.{{ container }}
{%- endfor %}
{%- endif %}