From 9db9f9d7087a0a3d3be1e7dd7dc9f4be1b1cfb2d Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 16 Oct 2015 13:07:35 +0200 Subject: [PATCH] library/roles/drupal-org/tasks/main.yml: Other basic steps that can be automated before running the drupal web install script. --- drupal-org/tasks/main.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drupal-org/tasks/main.yml b/drupal-org/tasks/main.yml index e7c8bf9d..00634ec6 100644 --- a/drupal-org/tasks/main.yml +++ b/drupal-org/tasks/main.yml @@ -36,6 +36,28 @@ register: unpack_drupal tags: drupal +- name: Create the default settings file + command: cp {{ drupal_install_dir }}/{{ item.virthost }}sites/default/default.settings.php {{ drupal_install_dir }}/{{ item.virthost }}sites/default/settings.php + args: + creates: {{ drupal_install_dir }}/{{ item.virthost }}sites/default/settings.php + with_items: phpfpm_pools + when: ( unpack_drupal | changed ) + tags: drupal + +- name: Create the default services file + command: cp {{ drupal_install_dir }}/{{ item.virthost }}sites/default/default.services.yml {{ drupal_install_dir }}/{{ item.virthost }}sites/default/services.yml + args: + creates: {{ drupal_install_dir }}/{{ item.virthost }}sites/default/services.yml + with_items: phpfpm_pools + when: ( unpack_drupal | changed ) + tags: drupal + +- name: Create the files directory + file: path={{ drupal_install_dir }}/{{ item.virthost }}sites/default/files owner={{ item.user }} group={{ item.group }} mode=0770 + with_items: phpfpm_pools + when: ( unpack_drupal | changed ) + tags: drupal + - name: Set the correct ownership of the drupal files file: dest={{ drupal_install_dir }}/{{ item.virthost }} owner={{ item.user }} group={{ item.group }} recurse=yes state=directory with_items: phpfpm_pools