Skip to content
Snippets Groups Projects
Commit 760a7344 authored by jurgenhaas's avatar jurgenhaas
Browse files

Bug fix and reverse proxy

parent 7740d823
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,11 @@ $conf['file_directory_private'] = 'sites/{{ item.shortname|default("default") }}
$conf['file_directory_temp'] = '{% if drupal.jail is defined %}{{ jailroot }}/{{ drupal.jail.name }}{% endif %}/tmp';
{% if varnish_host|default(false) %}
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array("{{ hostvars[varnish_host]['static_ipv4']|default(hostvars[varnish_host]['ansible_default_ipv4']['address']) }}");
$conf['varnish_cache_clear'] = '{{ varnish_cache_clear }}';
$conf['varnish_control_key'] = '{{ varnish_control_key }}';
{% if varnish_host == inventory_host %}
{% if varnish_host == inventory_hostname %}
$conf['varnish_control_terminal'] = '127.0.0.1:{{ varnish_control_port }}';
{% else %}
$conf['varnish_control_terminal'] = "{{ hostvars[varnish_host]['static_ipv4']|default(hostvars[varnish_host]['ansible_default_ipv4']['address']) }}:{{ varnish_control_port }}";
......
......@@ -44,9 +44,11 @@ $conf['file_private_path'] = 'sites/{{ item.shortname|default("default") }}/priv
$conf['file_temporary_path'] = '{% if drupal.jail is defined %}{{ jailroot }}/{{ drupal.jail.name }}{% endif %}/tmp';
{% if varnish_host|default(false) %}
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array("{{ hostvars[varnish_host]['static_ipv4']|default(hostvars[varnish_host]['ansible_default_ipv4']['address']) }}");
$conf['varnish_cache_clear'] = '{{ varnish_cache_clear }}';
$conf['varnish_control_key'] = '{{ varnish_control_key }}';
{% if varnish_host == inventory_host %}
{% if varnish_host == inventory_hostname %}
$conf['varnish_control_terminal'] = '127.0.0.1:{{ varnish_control_port }}';
{% else %}
$conf['varnish_control_terminal'] = "{{ hostvars[varnish_host]['static_ipv4']|default(hostvars[varnish_host]['ansible_default_ipv4']['address']) }}:{{ varnish_control_port }}";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment