From 495d30d4f389e5954f1924912f539fffb9d22cd0 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Sun, 8 Sep 2019 10:39:57 +0200
Subject: [PATCH] Allow custom directories to be made readonly

---
 tasks/install.yml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tasks/install.yml b/tasks/install.yml
index 2bd4358..6df0c6f 100644
--- a/tasks/install.yml
+++ b/tasks/install.yml
@@ -259,6 +259,19 @@
   when: drupal.install_extra_dirs|default(true)
   ignore_errors: yes
 
+- name: Make custom directories readonly
+  file:
+    path: '{{ webRoot }}/{{ item }}'
+    mode: ug-w
+    recurse: yes
+    follow: no
+  with_items: '{{ drupal.readonly|default([]) }}'
+  tags:
+    - deploy
+    - SetPermissions
+  when: drupal.install_extra_dirs|default(true)
+  ignore_errors: yes
+
 - name: Setup Crontabs for each domain
   cron:
     name: Drupal {{ item.1.name }}
-- 
GitLab