varnish: Just override the entire service file with ours
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
6ca42be5fc
commit
d84fa33451
2 changed files with 26 additions and 7 deletions
|
@ -32,14 +32,8 @@
|
|||
- varnish
|
||||
when: ansible_distribution_major_version|int >= 25 and ansible_distribution_major_version|int < 29
|
||||
|
||||
- name: make varnish override file dir
|
||||
file: name=/etc/systemd/system/varnish.service.d/ state=directory mode=0755 owner=root group=root
|
||||
tags:
|
||||
- varnish
|
||||
when: ansible_distribution_major_version|int >= 29
|
||||
|
||||
- name: install varnish /etc/systemd/system/varnish.service file (fedora 29+)
|
||||
template: src=varnish.f29.j2 dest=/etc/systemd/system/varnish.service.d/infra.conf owner=root group=root
|
||||
template: src=varnish.f29.j2 dest=/etc/systemd/system/varnish.service owner=root group=root
|
||||
notify:
|
||||
- reload systemd
|
||||
- restart varnish
|
||||
|
|
|
@ -12,6 +12,31 @@
|
|||
{% set VARNISH_STORAGE="malloc,256M" %}
|
||||
{% endif %}
|
||||
|
||||
[Unit]
|
||||
Description=Varnish Cache, a high-performance HTTP accelerator
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/sbin/varnishd -F -a :{{VARNISH_LISTEN_PORT}} -f /etc/varnish/default.vcl -s {{VARNISH_STORAGE}}
|
||||
|
||||
# Maximum number of open files (for ulimit -n)
|
||||
LimitNOFILE=131072
|
||||
|
||||
# Locked shared memory - should suffice to lock the shared memory log
|
||||
# (varnishd -l argument)
|
||||
# Default log size is 80MB vsl + 1M vsm + header -> 82MB
|
||||
# unit is bytes
|
||||
LimitMEMLOCK=85983232
|
||||
|
||||
# Enable this to avoid "fork failed" on reload.
|
||||
TasksMax=infinity
|
||||
|
||||
# Maximum size of the corefile.
|
||||
LimitCORE=infinity
|
||||
|
||||
ExecStart=/usr/sbin/varnishd -a :6081 -f /etc/varnish/default.vcl -s malloc,256m
|
||||
ExecReload=/usr/sbin/varnishreload
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue