Make filename configurable

This commit is contained in:
Oliver Davies 2019-05-02 19:49:39 +01:00
parent a11d7b65b7
commit 26ad8e735b
3 changed files with 3 additions and 2 deletions

View file

@ -6,5 +6,6 @@
- root: /var/www/test
sites:
- name: default
filename: settings.test.php
roles:
- role: opdavies.drupal-settings

View file

@ -12,7 +12,7 @@ def test_drupal_site_directory_exists(host):
assert directory.is_directory
def test_drupal_settings_file_exists(host):
file = host.file('/var/www/test/sites/default/settings.php')
file = host.file('/var/www/test/sites/default/settings.test.php')
assert file.exists
assert file.is_file

View file

@ -10,7 +10,7 @@
- name: Ensure that Drupal settings files are present
template:
src: settings.php.j2
dest: '{{ item.0.root }}/sites/{{ item.1.name|default("default") }}/settings.php
dest: '{{ item.0.root }}/sites/{{ item.1.name|default("default") }}/{{ item.1.filename|default("settings.php") }}'
with_subelements:
- '{{ drupal_settings }}'
- sites