Skip to content
Snippets Groups Projects
Commit 7740d823 authored by jurgenhaas's avatar jurgenhaas
Browse files

Allow access to Varnish control panel from Drupal sites

parent e26f5040
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,19 @@ $conf['file_directory_path'] = 'sites/{{ item.shortname|default("default") }}/fi
$conf['file_directory_private'] = 'sites/{{ item.shortname|default("default") }}/private';
$conf['file_directory_temp'] = '{% if drupal.jail is defined %}{{ jailroot }}/{{ drupal.jail.name }}{% endif %}/tmp';
{% if varnish_host|default(false) %}
$conf['varnish_cache_clear'] = '{{ varnish_cache_clear }}';
$conf['varnish_control_key'] = '{{ varnish_control_key }}';
{% if varnish_host == inventory_host %}
$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 }}";
{% endif %}
$conf['varnish_flush_cron'] = '{{ varnish_flush_cron }}';
$conf['varnish_socket_timeout'] = '{{ varnish_socket_timeout }}';
$conf['varnish_version'] = '{{ varnish_version }}';
{% endif %}
{% for line in item.extra_settings|default([]) %}
{{line}}
{% endfor %}
......
......@@ -43,6 +43,19 @@ $conf['file_public_path'] = 'sites/{{ item.shortname|default("default") }}/files
$conf['file_private_path'] = 'sites/{{ item.shortname|default("default") }}/private';
$conf['file_temporary_path'] = '{% if drupal.jail is defined %}{{ jailroot }}/{{ drupal.jail.name }}{% endif %}/tmp';
{% if varnish_host|default(false) %}
$conf['varnish_cache_clear'] = '{{ varnish_cache_clear }}';
$conf['varnish_control_key'] = '{{ varnish_control_key }}';
{% if varnish_host == inventory_host %}
$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 }}";
{% endif %}
$conf['varnish_flush_cron'] = '{{ varnish_flush_cron }}';
$conf['varnish_socket_timeout'] = '{{ varnish_socket_timeout }}';
$conf['varnish_version'] = '{{ varnish_version }}';
{% endif %}
if (file_exists('sites/all/modules{{ drupal_contrib_subdir }}/redis/redis.autoload.inc')) {
$conf['cache_backends'][] = 'sites/all/modules{{ drupal_contrib_subdir }}/redis/redis.autoload.inc';
$conf['cache_default_class'] = 'Redis_Cache';
......
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