service: Support specifying wants

This commit is contained in:
uumas
2025-03-22 01:43:47 +02:00
parent 2528e2605c
commit e3007ff405
4 changed files with 10 additions and 1 deletions

View File

@@ -12,4 +12,5 @@ service_database_type: none
service_additional_containers: []
service_requires: []
service_wants: []
service_auto_update: true

View File

@@ -199,6 +199,12 @@ argument_specs:
required: false
default: []
elements: str
service_wants:
description: List of systemd units this service container weakly depends on.
type: list
required: false
default: []
elements: str
service_auto_update:
description: Whether to let podman automatically update the service containers whenever the specified image gets updated
type: bool

View File

@@ -33,7 +33,7 @@
container_secrets: "{{ _service_container_secrets }}"
container_env: "{{ service_container_env }}"
container_requires: "{{ _service_container_requires }}"
container_wants: "{{ [service_name + '-socat.socket'] if service_domains | length > 0 else [] }}"
container_wants: "{{ _service_container_wants }}"
container_auto_update: "{{ service_auto_update }}"
- name: Reverse proxy for {{ service_name }}

View File

@@ -12,3 +12,5 @@ _service_container_secrets: >
)
| map('combine')
}}
_service_container_wants: "{{ service_wants + ([service_name + '-socat.socket'] if service_domains | length > 0 else []) }}"