Files
ansible-podman/roles/service/vars/main/template_validate.yaml
2026-09-21 05:51:32 +03:00

25 lines
683 B
YAML

---
_service_template_validate_secrets: >-
{{
_service_container_secrets
| map(attribute='name')
| zip(
_service_container_secrets
| community.general.remove_keys(['name', 'value', 'length'])
| map('items')
| map('map', 'join', '=')
| map('join', ',')
)
| map('join', ',')
| map('regex_replace', '^', '--secret ')
| join(' ')
}}
_service_template_validate_command: >-
podman run --rm
-v %s:{{ item.destination }}:ro
--entrypoint {{ item.template_validate_command.split(' ', 1)[0] }}
{{ _service_template_validate_secrets }}
{{ service_container_image }}
{{ item.template_validate_command.split(' ', 1)[1] }}