diff --git a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 index 0826731..bf91f03 100644 --- a/templates/drupal9/ce-dev/ansible/deploy.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/deploy.yml.j2 @@ -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: @@ -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. @@ -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 %} diff --git a/templates/drupal9/ce-dev/ansible/provision.yml.j2 b/templates/drupal9/ce-dev/ansible/provision.yml.j2 index 6e19495..59439d1 100644 --- a/templates/drupal9/ce-dev/ansible/provision.yml.j2 +++ b/templates/drupal9/ce-dev/ansible/provision.yml.j2 @@ -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 diff --git a/templates/drupal9/ce-dev/ansible/web/sites/default/local.drush.yml.j2 b/templates/drupal9/ce-dev/ansible/web/sites/default/local.drush.yml.j2 new file mode 100644 index 0000000..b88bf28 --- /dev/null +++ b/templates/drupal9/ce-dev/ansible/web/sites/default/local.drush.yml.j2 @@ -0,0 +1,4 @@ +# @see https://github.com/drush-ops/drush/blob/master/examples/example.drush.yml + +options: + uri: '{{ site.base_url }}' \ No newline at end of file diff --git a/templates/drupal9/ce-dev/ansible/web/sites/default/local.settings.php.j2 b/templates/drupal9/ce-dev/ansible/web/sites/default/local.settings.php.j2 new file mode 100644 index 0000000..82c8a8f --- /dev/null +++ b/templates/drupal9/ce-dev/ansible/web/sites/default/local.settings.php.j2 @@ -0,0 +1,33 @@ + '{{ 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'; +} diff --git a/templates/localgov/ce-dev/ansible/provision.yml.j2 b/templates/localgov/ce-dev/ansible/provision.yml.j2 index 4307d49..2f75b3f 100644 --- a/templates/localgov/ce-dev/ansible/provision.yml.j2 +++ b/templates/localgov/ce-dev/ansible/provision.yml.j2 @@ -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