Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all container unit parameters #1

Open
safeaim opened this issue Feb 20, 2024 · 1 comment
Open

Support all container unit parameters #1

safeaim opened this issue Feb 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@safeaim
Copy link
Owner

safeaim commented Feb 20, 2024

Currently the container.unit jinja2 template only supports a limited set of parameters.

See full list here:
podman-systemd.unit - systemd units using Podman Quadlet

@safeaim safeaim added the enhancement New feature or request label Feb 20, 2024
@safeaim
Copy link
Owner Author

safeaim commented Feb 25, 2024

{% macro optional_parameter(variable, line_format)%}
{% if variable is defined %}
{{ line_format|format(variable)}}
{% endif %}
{% endmacro %}
{{ optional_parameter(container_service_description, "Description=%s")-}}

Use this format to avoid 300 lines of if/else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant