This repository has been archived on 2020-05-07. You can view files and clone it, but cannot push or open issues or pull requests.
dokku-ansible-deploy/plays/predeploy/lib/volumes.yml

20 lines
472 B
YAML
Raw Normal View History

2020-04-14 09:07:24 +00:00
---
- name: Create volume mount directories
become: true
file:
2020-04-14 13:39:43 +00:00
path: "{{ item.src }}"
2020-04-14 13:51:39 +00:00
state: "{{ item.type }}"
owner: dokku
group: dokku
2020-04-14 11:44:09 +00:00
with_items: "{{ config.volumes }}"
when:
- config.volumes
- item.create | default(false)
2020-04-14 09:07:24 +00:00
- name: Attach volume mounts
dokku_storage:
2020-04-14 11:44:09 +00:00
app: "{{ dokku.app }}"
2020-04-15 10:40:29 +00:00
mounts: "{{ item.src }}:{{ item.dest }}{{ ':' + item.mode | default('') }}"
2020-04-14 11:44:09 +00:00
with_items: "{{ config.volumes }}"
when: config.volumes