Ensure that Drupal settings files are present

This commit is contained in:
Oliver Davies 2019-05-02 19:11:07 +01:00
parent dbbb8b225f
commit a11d7b65b7
3 changed files with 14 additions and 0 deletions

View file

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

View file

@ -6,3 +6,11 @@
with_subelements:
- '{{ drupal_settings }}'
- sites
- 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
with_subelements:
- '{{ drupal_settings }}'
- sites

View file