varnish
Ansible Role: Varnish Cache
Installs Varnish Cache version 4/5/6 on RHEL / CentOS 8 and 7 and may be used for either single or multi instance configurations where one or more named varnish services are configured on the same server. See package cloud for details on available versions: https://packagecloud.io/varnishcache/
This role by default installs a VCL specifically geared towards Magento 2, although any VCL may be used by using your own template and setting it's path via the varnish_vcl_template
variable. With this being the case, other varnish default tuning params are also pre-configured in a manner that more well suits deployment of the Magento 2 application.
Requirements
None.
Role Variables
See defaults/main.yml
for a list of variables available to customize the service.
Example Usage
Single varnish instance:
- { role: davidalger.varnish, tags: varnish }
Multi varnish instance. With the following configuration, the
varnish
service is disabled and avarnish-site1
andvarnish-site2
service will be setup.- { role: davidalger.varnish, tags: varnish, varnish_instance: { name: site1, port: 6081, admin_port: 6082 }} - { role: davidalger.varnish, tags: varnish, varnish_instance: { name: site2, port: 6091, admin_port: 6092 }}
License
This work is licensed under the MIT license. See LICENSE file for details.
Author Information
This role was created in 2017 by David Alger.
ansible-galaxy install davidalger/ansible-role-varnish