forked from evolix/ansible-roles
4be248ce58
We need to switch to copy module instead of ini_file since it doe not support putting the same key multiple times in a section.
31 lines
673 B
YAML
31 lines
673 B
YAML
---
|
|
- name: Install Varnish
|
|
apt:
|
|
name: varnish
|
|
state: present
|
|
|
|
- name: Remove default varnish configuration files
|
|
file:
|
|
path: "{{ item }}"
|
|
state: absent
|
|
with_fileglob: "/etc/defaults/varnish*"
|
|
|
|
- name: Copy Custom Varnish ExecReload script
|
|
copy:
|
|
src: "reload-vcl.sh"
|
|
dest: "/etc/varnish/reload-vcl.sh"
|
|
mode: "700"
|
|
owner: root
|
|
group: root
|
|
|
|
- name: Create a system config directory for systemd overrides
|
|
file:
|
|
path: /etc/systemd/system/varnish.service.d
|
|
state: directory
|
|
|
|
- name: Modify Varnish configuration files
|
|
copy:
|
|
src: varnish.conf
|
|
dest: /etc/systemd/system/varnish.service.d/
|
|
notify: reload systemctl
|