Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
Config Sync Check Tool (#28)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Dorison <[email protected]>
  • Loading branch information
adamzimmermann and markdorison authored Sep 21, 2020
1 parent 1971b13 commit dd801ef
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ deploydrupal_drush_cache_rebuild: true
deploydrupal_file_permission_fix_directories:
- 'styles'
- 'media-icons'

# Config check. Useful for validating config in pre-production environments.
deploydrupal_config_check_structure: false
deploydrupal_config_check_structure_string: "active configuration is identical"
11 changes: 11 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,17 @@
when:
- deploydrupal_drush_deploy

# Identify Drupal configuration changes in core or contrib updates that need
# to be exported and may have been missed.
- name: config structure check
shell: "{{ deploydrupal_drush_path }} config:export -y"
args:
chdir: "{{ deploydrupal_core_path }}/sites/{{ deploydrupal_site_name }}"
register: deploydrupal_config_check_result
when:
- deploydrupal_config_check_structure
failed_when: "deploydrupal_config_check_structure_string not in deploydrupal_config_check_result.stderr"

# Save redis data to disk. This is necessary in Docker environments to ensure we
# preserve the correct cache state.
- name: save redis data to disk.
Expand Down

0 comments on commit dd801ef

Please sign in to comment.