Skip to content
This repository was archived by the owner on Dec 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions templates/drupal9/ce-dev/ansible/deploy.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# This actually does not take any backup, but is needed to populate settings.php.
- mysql_backup:
handling: none
credentials_handling: static
credentials_handling: manual
# A list of Drupal sites (for multisites).
- drupal:
sites:
Expand All @@ -35,17 +35,25 @@
no_dev: false
working_dir: "{{ deploy_path }}"
apcu_autoloader: false
- drush:
use_vendor: true
- drush_bin: "{{ deploy_path }}/vendor/drush/drush/drush"
- lhci_run:
# Create a list of URLs to test with LHCI
test_urls:
- "https://{{ _domain_name }}"
pre_tasks:
# You can safely remove these steps once you have a working composer.json.
- name: Download composer file.
get_url:
ansible.builtin.get_url:
url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json
dest: "{{ deploy_path }}/composer.json"
force: false
- name: Install drush.
command:
cmd: composer require drush/drush:11.*
chdir: "{{ deploy_path }}"
community.general.composer:
command: require
arguments: drush/drush:11.*
working_dir: "{{ deploy_path }}"
roles:
- _init # Sets some variables the deploy scripts rely on.
- composer # Composer install step.
Expand All @@ -54,4 +62,5 @@
# - sync/database_sync # Grab database from a remote server.
- database_apply # Run drush updb and config import.
- _exit # Some common housekeeping.
- lhci_run
{% endraw %}
9 changes: 2 additions & 7 deletions templates/drupal9/ce-dev/ansible/provision.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,9 @@
cli: true
- lhci:
enable_vnc: true
- nodejs:
version: 16.x
{% endraw %}
pre_tasks:
# Debian has nodejs 12.x installed by default.
- name: Remove "node" package installed by default
ansible.builtin.apt:
name: nodejs
state: absent
purge: true
tasks:
- apt:
update_cache: true
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# @see https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml

options:
uri: '{{ site.base_url }}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/**
* Include default settings.
*/
require __DIR__ . '/default.settings.php';

/**
* Include default local dev settings.
*/
require DRUPAL_ROOT . '/sites/example.settings.local.php';

$databases['default']['default'] = array (
'database' => '{{ build_databases[0].name }}',
'username' => '{{ build_databases[0].user }}',
'password' => '{{ build_databases[0].password }}',
'prefix' => '',
'host' => '{{ build_databases[0].host }}',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
);

$settings['file_private_path'] = '{{ build_private_file_path }}';
$settings['file_public_path'] = '{{ build_public_file_path }}';
$settings['config_sync_directory'] = '{{ build_config_sync_directory }}';

/**
* Load local development override configuration, if available.
*/
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
include $app_root . '/' . $site_path . '/settings.local.php';
}
7 changes: 0 additions & 7 deletions templates/localgov/ce-dev/ansible/provision.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@
- lhci:
enable_vnc: true
{% endraw %}
pre_tasks:
# Debian has nodejs 12.x installed by default.
- name: Remove "node" package installed by default
ansible.builtin.apt:
name: nodejs
state: absent
purge: true
tasks:
- apt:
update_cache: true
Expand Down