Files
fedora-infra_ansible/roles/varnish/tasks/main.yml
Michal Konecny 2ec055db6f Use first uppercase letter for all handlers
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>
2025-02-10 20:31:49 +00:00

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