Skip to content

Commit 710a4e3

Browse files
authored
CE-DEV: some updates and tweaks (#96)
* Renamed the settings and drush files for ce-dev * Added nodejs 16.x as default version * Added lhci_run role by default * Some tweaks in the config * Added the if statement to read info from an optional settings.local.php file
1 parent 62e753e commit 710a4e3

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

templates/drupal9/ce-dev/ansible/deploy.yml.j2

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# This actually does not take any backup, but is needed to populate settings.php.
1515
- mysql_backup:
1616
handling: none
17-
credentials_handling: static
17+
credentials_handling: manual
1818
# A list of Drupal sites (for multisites).
1919
- drupal:
2020
sites:
@@ -35,17 +35,25 @@
3535
no_dev: false
3636
working_dir: "{{ deploy_path }}"
3737
apcu_autoloader: false
38+
- drush:
39+
use_vendor: true
40+
- drush_bin: "{{ deploy_path }}/vendor/drush/drush/drush"
41+
- lhci_run:
42+
# Create a list of URLs to test with LHCI
43+
test_urls:
44+
- "https://{{ _domain_name }}"
3845
pre_tasks:
3946
# You can safely remove these steps once you have a working composer.json.
4047
- name: Download composer file.
41-
get_url:
48+
ansible.builtin.get_url:
4249
url: https://raw.githubusercontent.com/drupal/recommended-project/9.3.x/composer.json
4350
dest: "{{ deploy_path }}/composer.json"
4451
force: false
4552
- name: Install drush.
46-
command:
47-
cmd: composer require drush/drush:11.*
48-
chdir: "{{ deploy_path }}"
53+
community.general.composer:
54+
command: require
55+
arguments: drush/drush:11.*
56+
working_dir: "{{ deploy_path }}"
4957
roles:
5058
- _init # Sets some variables the deploy scripts rely on.
5159
- composer # Composer install step.
@@ -54,4 +62,5 @@
5462
# - sync/database_sync # Grab database from a remote server.
5563
- database_apply # Run drush updb and config import.
5664
- _exit # Some common housekeeping.
65+
- lhci_run
5766
{% endraw %}

templates/drupal9/ce-dev/ansible/provision.yml.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
cli: true
4949
- lhci:
5050
enable_vnc: true
51+
- nodejs:
52+
version: 16.x
5153
{% endraw %}
5254
tasks:
5355
- apt:

templates/drupal9/ce-dev/ansible/web/sites/default/ce-dev.settings.php.j2 renamed to templates/drupal9/ce-dev/ansible/web/sites/default/local.settings.php.j2

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
* Include default settings.
55
*/
66
require __DIR__ . '/default.settings.php';
7+
78
/**
8-
* Include local dev settings.
9+
* Include default local dev settings.
910
*/
10-
require DRUPAL_ROOT . '/sites/example.settings.local.php'
11+
require DRUPAL_ROOT . '/sites/example.settings.local.php';
1112

1213
$databases['default']['default'] = array (
1314
'database' => '{{ build_databases[0].name }}',
@@ -22,8 +23,11 @@ $databases['default']['default'] = array (
2223

2324
$settings['file_private_path'] = '{{ build_private_file_path }}';
2425
$settings['file_public_path'] = '{{ build_public_file_path }}';
25-
26-
// Drupal < 8.8
27-
$config_directories['sync'] = '{{ build_config_sync_directory }}';
28-
// Drupal 8.8
2926
$settings['config_sync_directory'] = '{{ build_config_sync_directory }}';
27+
28+
/**
29+
* Load local development override configuration, if available.
30+
*/
31+
if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) {
32+
include $app_root . '/' . $site_path . '/settings.local.php';
33+
}

0 commit comments

Comments
 (0)