Skip to content
Snippets Groups Projects
Commit 9c173317 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/alphabet#621 Allow for a Drupal domain with a separate...

ansible-inventories/alphabet#621 Allow for a Drupal domain with a separate vhost but no real Drupal installation
parent 37671119
Branches
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@
group: '{{ apacheUser }}'
mode: '775'
with_items: '{{ drupal.domains }}'
when: item.install|default(true)
- name: "Link to site specific config directory"
file:
......@@ -25,6 +26,7 @@
owner: '{{ apacheUser }}'
group: '{{ apacheUser }}'
with_items: '{{ drupal.domains }}'
when: item.install|default(true)
when: directory.stat.exists
......@@ -40,5 +42,6 @@
with_nested:
- '{{ drupal.domains }}'
- '{{ drupal_config_directories }}'
when: item.0.install|default(true)
when: not directory.stat.exists
......@@ -106,12 +106,14 @@
with_nested:
- '{{ drupal.domains }}'
- ['settings', 'config']
when: item.0.install|default(true)
- name: "Ensure Site Directories"
file:
dest='{{ drupalRoot }}/sites/{{ item.shortname|default("default") }}'
state='directory'
with_items: '{{ drupal.domains }}'
when: item.install|default(true)
- include: files.yml
with_nested:
......@@ -120,6 +122,7 @@
loop_control:
loop_var: drupal_domain
tags: 'SetPermissions'
when: drupal_domain.0.install|default(true)
- name: "Create symbolic links"
file:
......@@ -130,7 +133,7 @@
with_subelements:
- '{{ drupal.domains }}'
- aliases
when: drupal.version|default("d7") == "d6" and drupal_d6_create_symbolic_links
when: drupal.version|default("d7") == "d6" and drupal_d6_create_symbolic_links and item.0.install|default(true)
- name: "Create the settings.php files"
template:
......@@ -138,6 +141,7 @@
dest='{{ webRoot }}/settings/{{ item.shortname|default("default") }}/settings.php'
with_items: '{{ drupal.domains }}'
tags: 'deploy'
when: item.install|default(true)
- name: "Create symbolic links"
file:
......@@ -146,6 +150,7 @@
state='link'
force=yes
with_items: '{{ drupal.domains }}'
when: item.install|default(true)
- include: deploy/finalize_{{ drupal.version|default("d7") }}.yml
when: drupal_install_drupal
......@@ -189,6 +194,7 @@
- '{{ drupal.domains }}'
- crontabs
tags: 'cron'
when: item.0.install|default(true)
- name: "Set Extended Permissions"
command: setfacl -dRm u:{{ apacheUser }}:rwX,g:{{ apacheUser }}:rwX,o::rX {{ webRoot }}/files
......@@ -200,6 +206,7 @@
loop_control:
loop_var: drupal_domain
tags: 'mysql'
when: drupal_domain.install|default(true)
- name: "Check available Drush Aliases"
shell: drush site-alias
......
......@@ -5,7 +5,7 @@
ServerAdmin {{ apache_server_admin }}
ServerName {{ drupal_domain.domain }}
{% if not drupal_domain.aliases_redirect|default(False) %}
ServerAlias {{ drupal_domain.domain }}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}{% for trusted_domain in drupal_domain.trusted_domains|default([]) %} {{ trusted_domain }}{% endfor %}
ServerAlias {{ drupal_domain.domain }}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}
{% endif %}
RewriteEngine on
......@@ -29,7 +29,7 @@
ServerAdmin {{ apache_server_admin }}
ServerName {{ drupal_domain.domain }}
{% if not drupal_domain.aliases_redirect|default(False) %}
ServerAlias {{ drupal_domain.domain }}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}{% for trusted_domain in drupal_domain.trusted_domains|default([]) %} {{ trusted_domain }}{% endfor %}
ServerAlias {{ drupal_domain.domain }}{% for alias in drupal_domain.aliases|default([]) %} {{ alias }}{% endfor %}
{% endif %}
{% if drupal.jail is defined %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment