Skip to content
Snippets Groups Projects
Commit cc9a7f5c authored by jurgenhaas's avatar jurgenhaas
Browse files

Set permissions on Drupal files and provide update script

parent 760a7344
No related branches found
No related tags found
No related merge requests found
......@@ -25,7 +25,7 @@
dest: '{{ webRoot }}{{ drupal.src.git.target2 }}'
force: yes
version: '{{ drupal.src.git.branch|default(omit) }}'
when: drupal.src.git.target is defined
when: drupal.src.git.target2 is defined
- name: "Run Script"
shell: '{{ webRoot }}{{ drupal.src.git.target }}{{ drupal.src.script }}'
......
......@@ -47,6 +47,10 @@
- include: install.{{ installSource.mode|default("none") }}.yml
when: drupal_install_drupal and drupal_available is defined and drupal_available.stdout != '{{ drupalRoot }}/index.php'
- include: users.{{ installSource.mode|default("none") }}.yml
when: drupal_install_drupal and drupal.src.name is defined
tags: 'SetPermissions'
- name: "Configuration file"
template:
src='{{ item.src }}'
......
---
# file: roles/drupal/tasks/users.drush.yml
- set_fact: dummy=yes
---
# file: roles/drupal/tasks/users.gitscript.yml
- name: "Make sure the git group exists"
group: name='{{ drupal.src.name }}'
- name: "Add users to git group"
user:
name='{{ item }}'
groups='{{ drupal.src.name }}'
append=yes
with_items: '{{ drupal.src.users|default([]) }}'
- name: "File Modes and Ownership for Repository"
file:
path='{{ webRoot }}{{ drupal.src.git.target }}'
owner='root'
group='{{ drupal.src.name }}'
mode='ug+rw,o+r,o-w'
recurse=yes
- name: "Create Update Script"
template:
src='scripts/update/gitscript'
dest='{{ webRoot }}/.update'
owner='root'
group='root'
mode='755'
---
# file: roles/drupal/tasks/users.none.yml
- set_fact: dummy=yes
---
# file: roles/drupal/tasks/users.svn.yml
- set_fact: dummy=yes
#!/usr/bin/env bash
{% set path=[webRoot, drupal.src.git.target2|default(drupal.src.git.target)]|join('') %}
cd {{ path }}
chown -R {{ apacheUser }}:{{ apacheUser }} {{ path }}
chmod -R g+w {{ path }}
git fetch origin
git pull origin master
chown -R {{ apacheUser }}:{{ apacheUser }} {{ path }}
chmod -R ug+r,ug-w,o-w,o-r {{ path }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment