Skip to content

Commit

Permalink
Merge pull request netgen#40 from hknezevic/varnish_fix
Browse files Browse the repository at this point in the history
Varnish fix
  • Loading branch information
emodric committed Dec 27, 2017
2 parents a06d40b + 8faed42 commit a846ff2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
16 changes: 13 additions & 3 deletions provisioning/roles/varnish/tasks/main.yml
@@ -1,12 +1,22 @@
---
# tasks file for varnish

- name: Add Varnish apt key
apt_key: url=http://repo.varnish-cache.org/debian/GPG-key.txt state=present
- name: Varnish version to use
set_fact:
varnish_version: '4.1'

- name: Set the packagecloud repository name based on the version.
set_fact:
varnish_packagecloud_repo: "varnish{{ varnish_version|replace('.', '') }}"

- name: Add packagecloud.io Varnish apt key
apt_key:
url: https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/gpgkey
state: present

- name: Add Varnish apt repository
apt_repository:
repo: 'deb http://repo.varnish-cache.org/ubuntu {{ ansible_distribution_release }} varnish-4.0'
repo: 'deb https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/ubuntu {{ ansible_distribution_release }} main'
state: present

- name: Install Varnish.
Expand Down
3 changes: 0 additions & 3 deletions provisioning/roles/varnish/templates/varnish-defaults.j2
Expand Up @@ -37,7 +37,6 @@ RELOAD_VCL=1
#DAEMON_OPTS="-a :6081 \
# -T localhost:6082 \
# -b localhost:8080 \
# -u varnish -g varnish \
# -s file,/var/lib/varnish/varnish_storage.bin,1G"


Expand All @@ -50,7 +49,6 @@ RELOAD_VCL=1
#DAEMON_OPTS="-a :6081 \
# -T localhost:6082 \
# -f /etc/varnish/default.vcl \
# -u varnish -g varnish \
# -S /etc/varnish/secret \
# -s file,/var/lib/varnish/varnish_storage.bin,1G"

Expand Down Expand Up @@ -99,7 +97,6 @@ DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
-p thread_pool_min=${VARNISH_MIN_THREADS} \
-p thread_pool_max=${VARNISH_MAX_THREADS} \
-p thread_pool_timeout=${VARNISH_THREAD_TIMEOUT} \
-u varnish -g varnish \
-S ${VARNISH_SECRET_FILE} \
-s ${VARNISH_STORAGE}"
#
Expand Down

0 comments on commit a846ff2

Please sign in to comment.