Use defined syntax and make sure to create directories
This commit is contained in:
parent
7c3802fa2c
commit
0079925738
@ -1,6 +1,17 @@
|
||||
---
|
||||
- name: Create volume mount directories
|
||||
become: true
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
owner: dokku
|
||||
group: dokku
|
||||
with_items: "{{ mounts }}"
|
||||
when: mounts is defined
|
||||
|
||||
- name: Attach volume mounts
|
||||
dokku_storage:
|
||||
app: "{{ app }}"
|
||||
mounts: "{{ item }}"
|
||||
with_items: "{{ lookup('vars', 'mounts', default=[]) }}"
|
||||
with_items: "{{ mounts }}"
|
||||
when: mounts is defined
|
||||
|
Reference in New Issue
Block a user