Programatically creating a Quadlet and activating it with systemctl daemon-reload / start? #21435
Replies: 2 comments 5 replies
-
Disclaimer: Untested idea. Maybe combining
could work? On the host set up a systemd user path unit with
Let the path unit trigger a systemd user service ( Podman command to run the quadlet creator container
The container writes a quadlet file to /containers/foobar.tmp/my.container and then renames the file
(I guess it's good practice to use Maybe |
Beta Was this translation helpful? Give feedback.
-
I usually use Ansible for this. For example, the demo described in this blog post can be provisioned using this playbook.yml |
Beta Was this translation helpful? Give feedback.
-
Hello, how could i go about creating a Quadlet and activating it by calling
systemctl --user daemon-reload
andsystemctl --user start
programtically, and ideally having that code running in a container? Easy enough to mount a~/.config/containers/systemd/
volume to the container to write the .container file to, but how could i callsystemctl
and get it to apply to the host not the container?Beta Was this translation helpful? Give feedback.
All reactions