Skip to content
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
5 changes: 5 additions & 0 deletions docs/roles/_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ These variables **must** be set in the `deploy/common.yml` file, at least.
# this will ensure defaults to other roles too.
# If you are using ce-provision to deploy infrastructure this must match the `user_deploy.username` variable
deploy_user: "deploy"
# for MySQL CE you might want to add '--set-gtid-purged=OFF --skip-definer' here
_mysqldump_params: "--max-allowed-packet=128M --single-transaction --skip-opt -e --quick --skip-disable-keys --skip-add-locks -C -a --add-drop-table"
drupal:
sites:
Expand All @@ -23,6 +24,7 @@ drupal:
# End Drupal 8 variables
# Drupal 7 variables
revert_features_command: "" # i.e. "fra"
revert_ctools_command: "ctools-export-revert --all"
# End Drupal 7 variables
sanitize_command: "sql-sanitize"
base_url: https://www.example.com
Expand All @@ -35,6 +37,9 @@ mautic:
image_path: "media/images"
force_install: false
bin_directory: "/home/{{ deploy_user }}/.bin"
# Number of dumps/db to look up for cleanup.
cleanup_history_depth: 50

```

<!--ENDROLEVARS-->
5 changes: 5 additions & 0 deletions roles/_init/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ These variables **must** be set in the `deploy/common.yml` file, at least.
# this will ensure defaults to other roles too.
# If you are using ce-provision to deploy infrastructure this must match the `user_deploy.username` variable
deploy_user: "deploy"
# for MySQL CE you might want to add '--set-gtid-purged=OFF --skip-definer' here
_mysqldump_params: "--max-allowed-packet=128M --single-transaction --skip-opt -e --quick --skip-disable-keys --skip-add-locks -C -a --add-drop-table"
drupal:
sites:
Expand All @@ -23,6 +24,7 @@ drupal:
# End Drupal 8 variables
# Drupal 7 variables
revert_features_command: "" # i.e. "fra"
revert_ctools_command: "ctools-export-revert --all"
# End Drupal 7 variables
sanitize_command: "sql-sanitize"
base_url: https://www.example.com
Expand All @@ -35,6 +37,9 @@ mautic:
image_path: "media/images"
force_install: false
bin_directory: "/home/{{ deploy_user }}/.bin"
# Number of dumps/db to look up for cleanup.
cleanup_history_depth: 50

```

<!--ENDROLEVARS-->
2 changes: 1 addition & 1 deletion roles/_init/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ drupal:
# End Drupal 8 variables
# Drupal 7 variables
revert_features_command: "" # i.e. "fra"
revert_ctools: true
revert_ctools_command: "ctools-export-revert --all"
# End Drupal 7 variables
sanitize_command: "sql-sanitize"
base_url: https://www.example.com
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@

- name: Revert Drupal configuration from Ctools.
ansible.builtin.shell:
cmd: "{{ drush_bin }} -y ctools-export-revert --all"
cmd: "{{ drush_bin }} -y {{ site.revert_ctools_command }}"
chdir: "{{ deploy_path }}/{{ webroot }}/sites/{{ site.folder }}"
when: ctools_enabled.stdout == "1"
3 changes: 2 additions & 1 deletion roles/database_apply/database_apply-drupal7/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@
loop_control:
loop_var: site
when:
- site.revert_ctools
- previous_build_number > 0
- site.revert_ctools_command | length > 0