{% if "proxy" in inventory_hostname %}
{% set VARNISH_LISTEN_PORT=6081 %}
{% else %}
{% set VARNISH_LISTEN_PORT=80 %}
{% endif %}

{% if varnish_group == 'kojipkgs' %}
{% set VARNISH_STORAGE="malloc,48GB" %}
{% elif varnish_group == 's390kojipkgs' %}
{% set VARNISH_STORAGE="file,/var/lib/varnish/varnish_storage.bin,20G" %}
{% else %}
{% set VARNISH_STORAGE="malloc,256M" %}
{% endif %}

[Service]
Type=simple
ExecStart=/usr/sbin/varnishd -F -a :{{VARNISH_LISTEN_PORT}} -f /etc/varnish/default.vcl -s {{VARNISH_STORAGE}}
