From 96489e40dbee7ca699a2ed2229fc957365253873 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Thu, 16 Apr 2020 12:20:11 +0200 Subject: [PATCH] Add dirs plays to pre-deploy --- plays/predeploy/lib/dirs.yml | 10 ++++++++++ plays/predeploy/predeploy.yml | 1 + 2 files changed, 11 insertions(+) create mode 100644 plays/predeploy/lib/dirs.yml diff --git a/plays/predeploy/lib/dirs.yml b/plays/predeploy/lib/dirs.yml new file mode 100644 index 0000000..033cc7d --- /dev/null +++ b/plays/predeploy/lib/dirs.yml @@ -0,0 +1,10 @@ +--- +- name: Create application directories on the system level + become: true + file: + path: "{{ item.path }}" + state: "{{ item.type }}" + owner: "{{ item.owner | default('dokku') }}" + group: "{{ item.group | default('dokku') }}" + with_items: "{{ config.dirs }}" + when: config.dirs diff --git a/plays/predeploy/predeploy.yml b/plays/predeploy/predeploy.yml index f03a86a..4612ae9 100644 --- a/plays/predeploy/predeploy.yml +++ b/plays/predeploy/predeploy.yml @@ -5,6 +5,7 @@ - include: ../commonlib/vars.yml - include: ./lib/domain.yml - include: ./lib/database.yml + - include: ./lib/dirs.yml - include: ./lib/hooks.yml - include: ./lib/files.yml - include: ./lib/templates.yml