service: Validation, set default for mounts in additional containers

This commit is contained in:
uumas
2025-11-26 22:26:12 +02:00
parent 47088fd1a0
commit b2540e2bd3
2 changed files with 6 additions and 1 deletions

View File

@@ -1,4 +1,9 @@
--- ---
- name: Fail if service_name is empty
ansible.builtin.fail:
msg: service_name must not be empty
when: service_name | length == 0
- name: Fail if service_container_user is not string - name: Fail if service_container_user is not string
ansible.builtin.fail: ansible.builtin.fail:
msg: "service_container_user must be a string, not int." msg: "service_container_user must be a string, not int."

View File

@@ -45,7 +45,7 @@ _service_all_template_mounts: >-
_service_template_mounts + _service_template_mounts +
( (
_service_additional_containers | _service_additional_containers |
map(attribute='mounts') | map(attribute='mounts', default=[]) |
flatten flatten
) )
) | ) |