Generate settings file per deployment

This commit is contained in:
Oliver Davies 2019-07-23 01:26:17 +01:00
parent 0f22c4e8ba
commit 9eb333da90
3 changed files with 19 additions and 2 deletions

View file

@ -3,8 +3,8 @@
become: true
roles:
- ansistrano.deploy
- drupal-settings
- ansistrano.deploy
vars_files:
- vars/vault.yml

View file

@ -1,4 +1,21 @@
---
- name: Remove settings.php
file:
path: '{{ ansistrano_release_path.stdout }}/web/sites/{{ item.1.name|default("default")}}/settings.php'
state: absent
with_subelements:
- '{{ drupal_settings }}'
- sites
- name: Link settings.php
file:
src: '/tmp/app/sites/{{ item.1.name|default("default")}}/settings.php'
dest: '{{ ansistrano_release_path.stdout }}/web/sites/{{ item.1.name|default("default")}}/settings.php'
state: link
with_subelements:
- '{{ drupal_settings }}'
- sites
- name: Install Composer dependencies
composer:
command: install

View file

@ -32,7 +32,7 @@ app_db_user: "{{ vault_app_db_user }}"
app_hash_salt: "{{ vault_app_hash_salt }}"
drupal_settings:
- drupal_root: '{{ app_project_docroot }}'
- drupal_root: /tmp/app
sites:
- name: default
settings: