- name:Generate systemd unit file for anisette-v3 container
containers.podman.podman_generate_systemd:
name:anisette-v3
restart_policy:"always"
container_prefix:"pod"
new:true
dest:"/home/rootless/.config/systemd/user"
no_header:true
become_user:rootless
- name:Ensure anisettev3 container is started and enabled
ansible.builtin.systemd:
name:pod-anisette-v3
daemon_reload:true
state:started
scope:"user"
enabled:true
become_user:rootless
environment: # If you ever do systemctl stuff as the rootless user with containers, you must set that XDG variable so that you fix: Failed to connect to bus:Nomedium found, maybe good practise to put that export line into .bashrc mmm?
XDG_RUNTIME_DIR:/run/user/{{rootless_usr.uid}}
- name:Configure podman-auto-update on rootless
ansible.builtin.systemd:
name:podman-auto-update
daemon_reload:true
state:started
scope:"user"
enabled:true
become_user:rootless
environment: # If you ever do systemctl stuff as the rootless user with containers, you must set that XDG variable so that you fix: Failed to connect to bus:Nomedium found, maybe good practise to put that export line into .bashrc mmm?
XDG_RUNTIME_DIR:/run/user/{{rootless_usr.uid}}
- name:Configure podman-auto-update.timer on rootless
ansible.builtin.systemd:
name:podman-auto-update.timer
daemon_reload:true
state:started
scope:"user"
enabled:true
become_user:rootless
environment: # If you ever do systemctl stuff as the rootless user with containers, you must set that XDG variable so that you fix: Failed to connect to bus:Nomedium found, maybe good practise to put that export line into .bashrc mmm?
XDG_RUNTIME_DIR:/run/user/{{rootless_usr.uid}}
# - name: Configure podman-auto-update.timer to run every minute