diff --git a/docs/roles/_init.md b/docs/roles/_init.md index 1c7e835e..9cb9e024 100644 --- a/docs/roles/_init.md +++ b/docs/roles/_init.md @@ -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: @@ -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 @@ -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 + ``` diff --git a/roles/_init/README.md b/roles/_init/README.md index 1c7e835e..9cb9e024 100644 --- a/roles/_init/README.md +++ b/roles/_init/README.md @@ -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: @@ -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 @@ -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 + ``` diff --git a/roles/_init/defaults/main.yml b/roles/_init/defaults/main.yml index 2602afd2..9a955f3e 100644 --- a/roles/_init/defaults/main.yml +++ b/roles/_init/defaults/main.yml @@ -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 diff --git a/roles/database_apply/database_apply-drupal7/tasks/ctools.yml b/roles/database_apply/database_apply-drupal7/tasks/ctools.yml index 518996ab..608e1a2f 100644 --- a/roles/database_apply/database_apply-drupal7/tasks/ctools.yml +++ b/roles/database_apply/database_apply-drupal7/tasks/ctools.yml @@ -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" diff --git a/roles/database_apply/database_apply-drupal7/tasks/main.yml b/roles/database_apply/database_apply-drupal7/tasks/main.yml index d64364c4..4f476253 100644 --- a/roles/database_apply/database_apply-drupal7/tasks/main.yml +++ b/roles/database_apply/database_apply-drupal7/tasks/main.yml @@ -54,4 +54,5 @@ loop_control: loop_var: site when: - - site.revert_ctools + - previous_build_number > 0 + - site.revert_ctools_command | length > 0