56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
---
|
|
_service_plain_container:
|
|
image: "{{ service_container_image }}"
|
|
entrypoint: "{{ service_container_entrypoint }}"
|
|
command: "{{ service_container_command }}"
|
|
user: "{{ service_container_user }}"
|
|
env: "{{ service_container_env }}"
|
|
mounts: "{{ _service_container_mounts }}"
|
|
|
|
_service_pinp_container_mounts:
|
|
- type: bind
|
|
source: "{{ _service_host_directory }}/mounts/entrypoint.sh"
|
|
destination: /entrypoint.sh
|
|
readonly: true
|
|
- type: volume
|
|
source: "containers"
|
|
destination: /home/podman/.local/share/containers
|
|
|
|
_service_pinp_container:
|
|
image: quay.io/podman/stable:latest
|
|
entrypoint: /entrypoint.sh
|
|
command: []
|
|
user: podman
|
|
env: {}
|
|
mounts: >-
|
|
{{
|
|
_service_pinp_container_mounts
|
|
+ (
|
|
_service_container_mounts
|
|
| zip(
|
|
_service_container_mounts
|
|
| map(attribute='source')
|
|
| map('replace', '/', '_')
|
|
| map('regex_replace', '^', '/mounts/')
|
|
| map('community.general.dict_kv', 'destination')
|
|
)
|
|
| map('combine')
|
|
)
|
|
}}
|
|
|
|
_service_container: >-
|
|
{{ _service_pinp_container if service_container_pinp else _service_plain_container }}
|
|
|
|
_service_container_pinp_inner_mounts: >-
|
|
{{
|
|
_service_container_mounts
|
|
| zip(
|
|
_service_container_mounts
|
|
| map(attribute='source')
|
|
| map('replace', '/', '_')
|
|
| map('regex_replace', '^', '/mounts/')
|
|
| map('community.general.dict_kv', 'source')
|
|
)
|
|
| map('combine')
|
|
}}
|