From 0b169492d3501e5073153b2e42c9c575681b5a33 Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Mon, 27 May 2024 18:11:15 +0200 Subject: [PATCH 1/2] Adding a new Drupal 10 meta role. --- docs/_Sidebar.md | 1 + docs/roles/_meta/deploy-drupal10.md | 19 +++++++++++ roles/_meta/deploy-drupal10/README.md | 19 +++++++++++ roles/_meta/deploy-drupal10/tasks/main.yml | 39 ++++++++++++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 docs/roles/_meta/deploy-drupal10.md create mode 100644 roles/_meta/deploy-drupal10/README.md create mode 100644 roles/_meta/deploy-drupal10/tasks/main.yml diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md index baa010a8..b8c4d52e 100644 --- a/docs/_Sidebar.md +++ b/docs/_Sidebar.md @@ -37,6 +37,7 @@ - [LHCI run](/roles/lhci_run) - [Maintenance Mode](/roles/maintenance_mode) - ["Meta"](/roles/_meta) + - [Drupal 10](/roles/_meta/deploy-drupal10) - [Drupal 7](/roles/_meta/deploy-drupal7) - [Drupal 8](/roles/_meta/deploy-drupal8) - [Matomo](/roles/_meta/deploy-matomo) diff --git a/docs/roles/_meta/deploy-drupal10.md b/docs/roles/_meta/deploy-drupal10.md new file mode 100644 index 00000000..0ee36b57 --- /dev/null +++ b/docs/roles/_meta/deploy-drupal10.md @@ -0,0 +1,19 @@ +# Drupal 10 +Role for deploying single Drupal instances, or multisites with a single database, of Drupal version 10.0.0 or higher. + +You should always top and tail this role with the `_init` and `_exit` roles and include the files with your Ansible variable overrides in via `vars_files`, here is an example playbook: + +```yaml +--- +- hosts: web1.example.com + vars_files: + - vars/common.yml + - vars/prod.yml + roles: + - _init + - _meta/deploy-drupal8 + - _exit +``` + + + diff --git a/roles/_meta/deploy-drupal10/README.md b/roles/_meta/deploy-drupal10/README.md new file mode 100644 index 00000000..0ee36b57 --- /dev/null +++ b/roles/_meta/deploy-drupal10/README.md @@ -0,0 +1,19 @@ +# Drupal 10 +Role for deploying single Drupal instances, or multisites with a single database, of Drupal version 10.0.0 or higher. + +You should always top and tail this role with the `_init` and `_exit` roles and include the files with your Ansible variable overrides in via `vars_files`, here is an example playbook: + +```yaml +--- +- hosts: web1.example.com + vars_files: + - vars/common.yml + - vars/prod.yml + roles: + - _init + - _meta/deploy-drupal8 + - _exit +``` + + + diff --git a/roles/_meta/deploy-drupal10/tasks/main.yml b/roles/_meta/deploy-drupal10/tasks/main.yml new file mode 100644 index 00000000..6b0d86ab --- /dev/null +++ b/roles/_meta/deploy-drupal10/tasks/main.yml @@ -0,0 +1,39 @@ +--- +# Default role for Drupal 10 and upwards. This is suitable for: +# - single site +# - multisites with a single database + +- ansible.builtin.import_role: + name: deploy_code +- ansible.builtin.import_role: + name: composer +- ansible.builtin.import_role: + name: npm +- ansible.builtin.import_role: + name: maintenance_mode + vars: + maintenance_mode: + operation: offline +- ansible.builtin.import_role: + name: database_backup +- ansible.builtin.import_role: + name: config_generate +- ansible.builtin.import_role: + name: cache_clear/cache_clear-opcache +- ansible.builtin.import_role: + name: database_apply +- ansible.builtin.import_role: + name: sanitize/admin_creds +- ansible.builtin.import_role: + name: live_symlink +- ansible.builtin.import_role: + name: cache_clear/cache_clear-drupal8 +- ansible.builtin.import_role: + name: maintenance_mode + vars: + maintenance_mode: + operation: online +- ansible.builtin.import_role: + name: cron/cron_database_backup +- ansible.builtin.import_role: + name: cron/cron_drupal8 From c2b68ba3f3cd56654a8fa41d812a518d1996c1c5 Mon Sep 17 00:00:00 2001 From: Greg Harvey Date: Mon, 27 May 2024 18:12:49 +0200 Subject: [PATCH 2/2] Bad copy/paste in docs. --- docs/roles/_meta/deploy-drupal10.md | 2 +- roles/_meta/deploy-drupal10/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/roles/_meta/deploy-drupal10.md b/docs/roles/_meta/deploy-drupal10.md index 0ee36b57..03cd9e40 100644 --- a/docs/roles/_meta/deploy-drupal10.md +++ b/docs/roles/_meta/deploy-drupal10.md @@ -11,7 +11,7 @@ You should always top and tail this role with the `_init` and `_exit` roles and - vars/prod.yml roles: - _init - - _meta/deploy-drupal8 + - _meta/deploy-drupal10 - _exit ``` diff --git a/roles/_meta/deploy-drupal10/README.md b/roles/_meta/deploy-drupal10/README.md index 0ee36b57..03cd9e40 100644 --- a/roles/_meta/deploy-drupal10/README.md +++ b/roles/_meta/deploy-drupal10/README.md @@ -11,7 +11,7 @@ You should always top and tail this role with the `_init` and `_exit` roles and - vars/prod.yml roles: - _init - - _meta/deploy-drupal8 + - _meta/deploy-drupal10 - _exit ```