This commit is contained in:
Daniel Akulenok
2026-01-10 23:21:34 +01:00
parent af66520dcb
commit 17fea0e02b
9 changed files with 452 additions and 380 deletions

View File

@@ -0,0 +1,18 @@
---
# Ensure volumes are created
- name: Create bind mount directories from containers
ansible.builtin.file:
path: "{{ item.1.split(':')[0] }}"
state: directory
mode: '0755'
owner: root
group: root
loop: "{{ podman_containers | subelements('volumes', skip_missing=True) }}"
when:
- podman_create_volumes | bool
- item.1 is string
- item.1.split(':')[0] | dirname | length > 0
- item.1.split(':')[0].startswith('/') or item.1.split(':')[0].startswith('./')
loop_control:
label: "{{ item.0.name }} -> {{ item.1.split(':')[0] }}"