From 61d7342d2c2fc78bbea51773421e7039252e5651 Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Wed, 23 Feb 2022 20:38:17 +0100 Subject: Configure GeoIP for moon phase support In order to add moon phase support on the dark theme picker later, we need to configure the GeoIP module included with nginx. On Debian, the `nginx` package that we install installs `nginx-core`, which in turn installs the GeoIP module and even a GeoIP country database for us. --- roles/nginx-geoip/tasks/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 roles/nginx-geoip/tasks/main.yml (limited to 'roles/nginx-geoip/tasks') diff --git a/roles/nginx-geoip/tasks/main.yml b/roles/nginx-geoip/tasks/main.yml new file mode 100644 index 0000000..3601828 --- /dev/null +++ b/roles/nginx-geoip/tasks/main.yml @@ -0,0 +1,16 @@ +--- +# ref https://packages.debian.org/bullseye/amd64/libnginx-mod-http-geoip/filelist +# installed by default in debian nginx package, including "geoip-database" dep +# see https://packages.debian.org/bullseye/amd64/geoip-database/filelist +- name: configure the geoip module + copy: + # ref https://nginx.org/en/docs/http/ngx_http_geoip_module.html + content: geoip_country /usr/share/GeoIP/GeoIP.dat; + dest: /etc/nginx/conf.d/geoip.conf + owner: root + group: root + mode: 0444 + tags: + - role::nginx-geoip + notify: + - reload the nginx service -- cgit v1.2.3