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
501 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 }}"
2020-04-15 11:54:54 +00:00
owner: "{{ item.owner | default('dokku') }}"
group: "{{ item.group | default('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 11:19:51 +00:00
mounts: "{{ item.src }}:{{ item.dest }}"
2020-04-14 11:44:09 +00:00
with_items: "{{ config.volumes }}"
when: config.volumes