mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 05:51:56 +08:00
This will unify all the handlers to use first uppercase letter for ansible-lint to stop complaining. I went through all `notify:` occurrences and fixed them by running ``` set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep -rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g" ``` Then I went through all the changes and removed the ones that wasn't expected to be changed. Fixes https://pagure.io/fedora-infrastructure/issue/12391 Signed-off-by: Michal Konecny <mkonecny@redhat.com>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
---
|
|
# Tasks to set up varnish
|
|
|
|
- name: Install needed packages
|
|
ansible.builtin.package: name={{ item }} state=present
|
|
with_items:
|
|
- varnish
|
|
- make
|
|
tags:
|
|
- varnish
|
|
- packages
|
|
|
|
- name: Set some varnishd selinux boolean
|
|
seboolean: name=varnishd_connect_any persistent=yes state=yes
|
|
tags:
|
|
- varnish
|
|
- selinux
|
|
|
|
- name: Set domain_can_mmap_files selinux boolean
|
|
seboolean: name=domain_can_mmap_files persistent=yes state=yes
|
|
tags:
|
|
- varnish
|
|
- selinux
|
|
|
|
- name: Install varnish /etc/systemd/system/varnish.service file (fedora 29+)
|
|
ansible.builtin.template: src=varnish.f29.j2 dest=/etc/systemd/system/varnish.service owner=root group=root
|
|
notify:
|
|
- Reload systemd
|
|
- Restart varnish
|
|
tags:
|
|
- varnish
|
|
when: ansible_distribution_major_version|int >= 29 and ansible_distribution == 'Fedora'
|
|
|
|
- name: Install /etc/varnish/default.vcl (proxies)
|
|
ansible.builtin.template: src={{ varnish_group }}.vcl.j2 dest=/etc/varnish/default.vcl owner=root group=root
|
|
notify:
|
|
- Restart varnish
|
|
tags:
|
|
- varnish
|
|
|
|
- name: Make sure varnish is set to enabled on boot
|
|
service: enabled=yes name=varnish
|
|
tags:
|
|
- varnish
|