Skip to content
Snippets Groups Projects
Commit 774fd553 authored by jurgenhaas's avatar jurgenhaas
Browse files

Avoid permanent changes of settings.php because of drupal_deploy_info, write...

Avoid permanent changes of settings.php because of drupal_deploy_info, write that to settings.local.php instead
parent 05f4cd0a
No related branches found
No related tags found
No related merge requests found
......@@ -188,6 +188,30 @@
- ApacheConfig
when: item.install|default(true)
- name: Add deploy info to settings.local.php files
lineinfile:
path: '{{ webRoot }}/settings/{{ item.0.shortname|default("default") }}/settings.local.php'
create: yes
regex: '{{ item.1.regex }}'
line: '{{ item.1.line }}'
with_nested:
- '{{ drupal.domains }}'
- [
{
regex: '^<\?php',
line: '<?php'
},
{
regex: 'drupal_deploy_info',
line: "$settings['drupal_deploy_info'] = array('branch' => '{{ drupalDeployInfoBranch }}','tag' => '{{ drupalDeployInfoTag }}','timestamp' => '{{ ansible_date_time.epoch }}',);"
}
]
tags:
- deploy
- ApacheConfig
when: item.0.install|default(true)
changed_when: no
- name: Create symbolic links
file:
src: '{{ relativeRoot }}/settings/{{ item.shortname|default("default") }}/settings.php'
......
<?php
$settings['drupal_deploy_info'] = array(
'branch' => '{{ drupalDeployInfoBranch }}',
'tag' => '{{ drupalDeployInfoTag }}',
'timestamp' => '{{ ansible_date_time.epoch }}',
);
$databases = array (
'default' => array (
'default' => array (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment