Files

34 lines
969 B
YAML

---
- name: Check out Drupal Core to the Apache docroot.
git:
repo: https://git.drupal.org/project/drupal.git
version: "{{ drupal_core_version }}"
dest: "{{ drupal_core_path }}"
register: git_checkout
- name: Ensure Drupal codebase is owned by www-data.
file:
path: "{{ drupal_core_path }}"
owner: www-data
group: www-data
recurse: true
when: git_checkout.changed | bool
- name: Install Drupal dependencies with Composer.
command: >
/usr/local/bin/composer install
chdir={{ drupal_core_path }}
creates={{ drupal_core_path }}/vendor/autoload.php
become_user: www-data
- name: Install Drupal.
command: >
drush si -y --site-name="{{ drupal_site_name }}"
--account-name=admin
--account-pass=admin
--db-url=mysql://{{ domain }}:1234@localhost/{{ domain }}
--root={{ drupal_core_path }}
creates={{ drupal_core_path }}/sites/default/settings.php
notify: restart apache
become_user: www-data