From 73771e63cb26df1ad81d28a37b73c204b30a6945 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Thu, 16 Apr 2020 12:09:59 +0200 Subject: [PATCH] Allow files hooks --- plays/predeploy/lib/files.yml | 10 ++++++++++ plays/predeploy/predeploy.yml | 1 + 2 files changed, 11 insertions(+) create mode 100644 plays/predeploy/lib/files.yml diff --git a/plays/predeploy/lib/files.yml b/plays/predeploy/lib/files.yml new file mode 100644 index 0000000..2001bc6 --- /dev/null +++ b/plays/predeploy/lib/files.yml @@ -0,0 +1,10 @@ +--- +- name: Copy over files + template: + src: "{{ app_config_root }}/files/{{ item.src }}" + dest: "{{ item.dest }}" + owner: "{{ item.owner | default('dokku') }}" + group: "{{ item.group | default('dokku') }}" + mode: "{{ item.mode | default(omit) }}" + with_items: "{{ config.files }}" + when: config.files diff --git a/plays/predeploy/predeploy.yml b/plays/predeploy/predeploy.yml index 8d4a26c..f03a86a 100644 --- a/plays/predeploy/predeploy.yml +++ b/plays/predeploy/predeploy.yml @@ -6,6 +6,7 @@ - include: ./lib/domain.yml - include: ./lib/database.yml - include: ./lib/hooks.yml + - include: ./lib/files.yml - include: ./lib/templates.yml - include: ./lib/volumes.yml - include: ./lib/env.yml