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

Implement Drupal deployment through composer

parent 0948a749
Branches
No related tags found
No related merge requests found
---
# file: roles/drupal/tasks/deploy/gitcomposer.yml
- name: "Ensure Repository Directory"
file:
path: '{{ webRoot }}'
state: 'directory'
owner: 'root'
group: 'root'
mode: '775'
- name: "Clone Git Repository"
git:
accept_hostkey: yes
repo: '{{ drupal.src.git.repository }}'
dest: '{{ webRoot }}'
force: yes
version: '{{ drupal.src.git.branch|default(omit) }}'
become: false
- name: "Run Composer"
composer:
command='update'
working_dir='{{ webRoot }}'
---
# file: roles/drupal/tasks/install/gitcomposer.yml
# IMPORTANT: The following should be called but really ONLY for new installs.
- name: "Make Sure Drupal Root Does Not Yet Exist"
file:
path: '{{ docRoot }}'
state: 'absent'
---
# file: roles/drupal/tasks/users/gitcomposer.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 }}'
owner='root'
group='{{ drupal.src.name }}'
mode='ug+rw,o+r,o-w'
recurse=yes
- name: "Extended File Modes and Ownership for Repository"
command: setfacl -dRm u:root:rwX,g:{{ drupal.src.name }}:rwX,o::rX {{ webRoot }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment