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

18 lines
396 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
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-14 13:39:43 +00:00
mounts: "{{ item.src }}:{{ item.dest }}"
2020-04-14 11:44:09 +00:00
with_items: "{{ config.volumes }}"
when: config.volumes