oliverdavies.uk-drupal-old/tools/ansible/deploy/after-update-code.yml

35 lines
920 B
YAML
Raw Normal View History

2020-02-07 07:43:17 +00:00
---
- name: Install Composer dependencies
composer:
command: install
2020-06-16 22:45:46 +00:00
optimize_autoloader: true
2020-02-07 07:43:17 +00:00
working_dir: '{{ ansistrano_release_path.stdout }}'
- name: Generate settings.php file
include_role:
name: opdavies.drupal_settings_files
2020-06-17 00:23:31 +00:00
- name: Clear Drush cache
command: >
{{ release_drush_path }}
cache-clear drush
chdir={{ release_web_path }}
changed_when: false
- name: Run database updates
2020-06-17 00:23:31 +00:00
command: >
{{ release_drush_path }}
updatedb -y
chdir={{ release_web_path }}
register: update_database_result
changed_when: "'No pending updates' not in update_database_result.stderr"
- name: Import configuration
2020-06-17 00:23:31 +00:00
command: >
{{ release_drush_path }} config-import -y
chdir={{ release_web_path }}
register: config_import_result
changed_when: "'There are no changes to import' not in config_import_result.stderr"
- include: ../includes/build-theme-assets.yml