Systemd not able to load quadlet service container files
Hi everyone,
I try to find a way to with my ansible playbook to deploy some podman containers. I saw that there is a way for non root users to run the service on their own.
However following the doc's I placed a service file right here: ~/.config/containers/systemd/containername.container
I then run 'systemctl --user daemon reload' without error.
When I try to start the service I receive: Could not find the requested service containername.service: host
I also tried to place the containername.container file under /etc/containers/systemd but it wont be found or loaded.
My tasks:
- name: service | setup | Place Container Service File
tags:
- setup
- service
become: true
become_user: "{{ service.user.name }}"
ansible.builtin.template:
src: templates/service.container
dest: ~/.config/containers/systemd/service.container
owner: "{{ service.user.name }}"
group: "{{ service.group.name }}"
mode: "0644"
- name: service | setup | Enable service
tags:
- setup
- service
become: true
become_user: "{{ service.user.name }}"
ansible.builtin.systemd:
name: "{{ service_service_name }}"
scope: user
enabled: true
daemon_reload: true
notify: restart service
The same happens when I login via ssh as podman user and do that manually.
Do I have to set a env path variable for systemd? I thought quadlet searches manually all these paths:
/etc/containers/systemd/
(system units)
/usr/share/containers/systemd/
(system units)
$XDG_CONFIG_HOME/containers/systemd/
(user units)
~/.config/containers/systemd/
(user units)
/etc/containers/systemd/users/$(UID)
(user units)
/etc/containers/systemd/users/
(user units)
Same result when I try that as root.