1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/mirror_load_balancer/tasks/main.yml
Jelle van der Waa 2c05e51b11
Switch over to geipupdate for GeoIP database
The geoip2-database package no longer contains database anymore and an
account is required. The database is now downloaded with a registered
API key in the vault.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
2020-04-03 23:34:36 +02:00

27 lines
836 B
YAML

---
- name: install nginx-mod-geoip2
pacman: name=nginx-mod-geoip2,geoipupdate state=present
- name: install geoipupdate config
template: src=GeoIP.conf.j2 dest=/etc/GeoIP.conf owner=root group=root mode=0644
notify:
- name: install mirror.pkgbuild.com.conf
template: src=nginx.d.conf.j2 dest=/etc/nginx/nginx.d/mirror.pkgbuild.com.conf owner=root group=root mode=0644
notify:
- reload nginx
tags: ['nginx']
- name: install toplevel-snippet
copy: src=load-geoip.conf dest=/etc/nginx/toplevel-snippets/load-geoip.conf owner=root group=root mode=0644
notify:
- reload nginx
tags: ['nginx']
- name: make nginx log dir
file: path=/var/log/nginx/{{ mirror_domain }} state=directory owner=root group=root mode=0755
- name: enable geoipupdate timer
systemd: name=geoipupdate.timer enabled=yes state=started