Files
ansible-podman/roles/service/tasks/mounts.yaml
uumas 1b62d4df72 service: Add support for template mounts
Template mounts are templated from jinja2 templates to a service name
-specific directory under /srv and bind mounted inside the container.
2024-11-19 20:10:33 +02:00

22 lines
665 B
YAML

---
- name: Create template mount directories under /srv
when: _service_template_mounts | length > 0
block:
- name: Create directory {{ _service_host_directory }}
ansible.builtin.file:
path: "{{ _service_host_directory }}"
state: directory
mode: "0755"
- name: Create directory {{ _service_host_directory + '/mounts' }}
ansible.builtin.file:
path: "{{ _service_host_directory }}/mounts"
state: directory
mode: "0700"
- name: Set mount definitions for {{ service_name }}
ansible.builtin.include_tasks: mount.yaml
loop: "{{ service_container_mounts }}"
loop_control:
loop_var: mount