From b2188ce1bd1c4d532280b3f6ba579860cb13a620 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Thu, 11 Aug 2016 12:24:57 +0200 Subject: [PATCH] library/roles/drupal-org: The modules directory needs to be writeable by the web server user to permit GUI upgrades. nemis-website/group_vars/nemis_web_dev/main.yml: OLD db data. --- drupal-org/defaults/main.yml | 2 ++ drupal-org/tasks/drupal-main.yml | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/drupal-org/defaults/main.yml b/drupal-org/defaults/main.yml index 2f55a59..80c76b5 100644 --- a/drupal-org/defaults/main.yml +++ b/drupal-org/defaults/main.yml @@ -8,6 +8,8 @@ drupal_tar_url: 'http://ftp.drupal.org/files/projects/{{ drupal_dist_file }}' drupal_php_user: drupal drupal_download_dir: /srv/drupal drupal_install_dir: /var/www +http_user: www-data +http_group: '{{ http_user }}' # If you use the PHP ppa to install php 5.6, also install those packages: # diff --git a/drupal-org/tasks/drupal-main.yml b/drupal-org/tasks/drupal-main.yml index 2c6a093..6fede23 100644 --- a/drupal-org/tasks/drupal-main.yml +++ b/drupal-org/tasks/drupal-main.yml @@ -68,6 +68,12 @@ when: ( unpack_drupal | changed ) tags: drupal +- name: Set the correct ownership of the drupal modules directory + file: dest={{ drupal_install_dir }}/{{ item.virthost }}/modules owner={{ item.user }} group={{ http_group }} recurse=yes state=directory mode=0775 + with_items: '{{ phpfpm_pools }}' + when: ( unpack_drupal | changed ) + tags: drupal + - name: Remove the original drupal unpacked distribution file: dest={{ drupal_download_dir }}/{{ drupal_dist_name }} state=absent when: ( unpack_drupal | changed )