diff --git a/roles/database_apply/database_apply-drupal8/tasks/main.yml b/roles/database_apply/database_apply-drupal8/tasks/main.yml index 23cb0b3b..3473d9e8 100644 --- a/roles/database_apply/database_apply-drupal8/tasks/main.yml +++ b/roles/database_apply/database_apply-drupal8/tasks/main.yml @@ -22,7 +22,7 @@ with_items: "{{ drupal.sites }}" loop_control: loop_var: site - when: previous_build_number == 0 or (site.force_install is defined and site.force_install) + when: (previous_build_number == 0) or (site.force_install is defined and site.force_install) - name: Fix permissions on Drupal directory. shell: @@ -30,12 +30,14 @@ with_items: "{{ drupal.sites }}" loop_control: loop_var: site - when: previous_build_number == 0 or (site.force_install is defined and site.force_install) + when: (previous_build_number == 0) or (site.force_install is defined and site.force_install) - name: Clear the cache. ansible.builtin.include_role: name: "cache_clear/cache_clear-{{ project_type }}" - when: previous_build_number > 0 + when: + - previous_build_number > 0 + - site.config_import_command != 'deploy' - name: Apply Drupal database updates. command: @@ -46,6 +48,7 @@ with_items: "{{ drupal.sites }}" loop_control: loop_var: site + when: site.config_import_command != 'deploy' - name: Import configuration. command: