Extend deployment feature
When re-deploying (a.k.a. updating) an existing Drupal site, the following steps are currently executed by Ansible:
- File Modes and Ownership
- Clone Git Repository
- Run Composer
- Ensure Drush Contrib Directory
- Link all global Drush commands
- drupalgeddon-7.x-1.x
- drush_sup-7.x-1.x
- registry_rebuild-7.x-1.x
- sar-7.x-1.x
- site_audit
- composer-8.x-1.x
- dev_modules-8.x-1.x
- Ensure extra directories
- /modules/custom
- /modules/contrib
- /themes/custom
- /themes/contrib
- Create the settings.php files
- Ensure site specific config directory
- Link to site specific config directory
- Ensure config directories
- File Modes and Ownership
- /web
- /config
- /files
- /settings
- Make site directories writeable
- /config
- /files
- Set Extended Permissions
- Run Post Deploy Tasks
- sset system.maintenance_mode 1
- cache-rebuild all
- config-import sync
- updatedb
- entity-updates
- dev-modules off
- sset system.maintenance_mode 0
This applies to all stages but probably requires different settings, especially for settings files and permissions.
Some of the steps above require parameters like usernames, etc. and those could probably be defined in a config file during initial installation or being even part of the composer.json.