podman
This commit is contained in:
18
tasks/host_directories.yml
Normal file
18
tasks/host_directories.yml
Normal 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] }}"
|
||||
Reference in New Issue
Block a user