Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Update geerlingguy.varnish role to latest version to resolve Ansible …
Browse files Browse the repository at this point in the history
…2.9 incompatibility.
  • Loading branch information
geerlingguy committed Nov 1, 2019
1 parent 5095f80 commit b8a4c8a
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion provisioning/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@
- src: geerlingguy.solr
version: 5.0.0
- src: geerlingguy.varnish
version: 3.0.0
version: 3.0.1
1 change: 0 additions & 1 deletion provisioning/roles/geerlingguy.varnish/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ env:
- MOLECULE_DISTRO: ubuntu1804
- MOLECULE_DISTRO: ubuntu1604
- MOLECULE_DISTRO: debian9
- MOLECULE_DISTRO: debian8

- MOLECULE_DISTRO: centos7
MOLECULE_PLAYBOOK: playbook-41.yml
Expand Down
10 changes: 9 additions & 1 deletion provisioning/roles/geerlingguy.varnish/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ Services that will be started at boot and should be running after this role is c

varnish_packagecloud_repo_yum_repository_priority: "1"

The `yum` priority for the Packagecloud repository used to install Varnish. Setting this explicitly forces yum to use the Packagecloud repositories to install Varnish even in environments (e.g. Amazon Linux) where other repositories may have higher priorities than the default.
(RedHat/CentOS only) The `yum` priority for the Packagecloud repository used to install Varnish. Setting this explicitly forces yum to use the Packagecloud repositories to install Varnish even in environments (e.g. Amazon Linux) where other repositories may have higher priorities than the default.

varnish_apt_repo: deb https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} main

(Debian/Ubuntu only) The `repo` for the apt repository.

varnish_yum_repo_baseurl: https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/el/{{ ansible_distribution_major_version|int }}/$basearch

(RedHat/CentOS only) The `baseurl` for the yum repository.

varnish_backends:
apache:
Expand Down
6 changes: 6 additions & 0 deletions provisioning/roles/geerlingguy.varnish/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ varnish_enabled_services:
# Make sure Packagecloud repo is used on RHEL/CentOS.
varnish_packagecloud_repo_yum_repository_priority: "1"

# Only used on RedHat / CentOS.
varnish_yum_repo_baseurl: https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/el/{{ ansible_distribution_major_version|int }}/$basearch

# Only used on Debian / Ubuntu.
varnish_apt_repo: deb https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} main

# Optionally define additional backends.
# varnish_backends:
# apache:
Expand Down
4 changes: 2 additions & 2 deletions provisioning/roles/geerlingguy.varnish/meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ galaxy_info:
description: Varnish for Linux.
company: "Midwestern Mac, LLC"
license: "license (BSD, MIT)"
min_ansible_version: 2.4
min_ansible_version: 2.5
platforms:
- name: EL
versions:
Expand All @@ -26,7 +26,7 @@ galaxy_info:
- varnish
- cache
- proxy
- reverse-proxy
- reverse
- performance
- loadbalancer
- balancer

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
extends: default
rules:
line-length:
max: 160
max: 180
level: warning
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- name: Add packagecloud.io Varnish apt repository.
apt_repository:
repo: "deb https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/{{ ansible_distribution | lower }}/ {{ ansible_distribution_release }} main"
repo: "{{ varnish_apt_repo }}"
state: present

- name: Ensure Varnish is installed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
yum_repository:
name: varnishcache_{{ varnish_packagecloud_repo }}
description: Varnish Cache packagecloud.io repository.
baseurl: https://packagecloud.io/varnishcache/{{ varnish_packagecloud_repo }}/el/{{ ansible_distribution_major_version|int }}/$basearch
baseurl: "{{ varnish_yum_repo_baseurl }}"
repo_gpgcheck: false
gpgcheck: false
enabled: true
Expand All @@ -25,6 +25,7 @@
args:
warn: false
when: varnish_packagecloud_repo_addition.changed
tags: ['skip_ansible_lint']

- name: Ensure Varnish is installed.
yum:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% if varnish_version | version_compare('4.0', '>=') %}
{% if varnish_version is version('4.0', '>=') %}
vcl 4.0;
{% endif %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ 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} \
{% if varnish_version | version_compare('4.1', '<') %}
{% if varnish_version is version('4.1', '<') %}
-u varnish -g varnish \
{% endif %}
{% if varnishd_extra_options %}
Expand Down

0 comments on commit b8a4c8a

Please sign in to comment.