caddy: geoip first attempt
This commit is contained in:
@@ -76,6 +76,15 @@
|
||||
notify:
|
||||
- "Restart Caddy"
|
||||
|
||||
# - name: Generate GeoIP config file
|
||||
# when: "caddy_geoip_account_id != None and caddy_geoip_license_key != None"
|
||||
# ansible.builtin.template:
|
||||
# src: "templates/GeoIP.conf"
|
||||
# dest: "/etc/GeoIP.conf"
|
||||
# mode: "0640"
|
||||
# notify:
|
||||
# - "Update GeoIP databases"
|
||||
|
||||
- name: Enable and start Caddy
|
||||
ansible.builtin.service:
|
||||
name: "{{ caddy_my_name }}"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
- name: Install requirements
|
||||
ansible.builtin.apt:
|
||||
ansible.builtin.package:
|
||||
name:
|
||||
- "git"
|
||||
- "libnss3-tools"
|
||||
- "ssl-cert"
|
||||
# - "geoipupdate"
|
||||
|
||||
- name: Create Go directory
|
||||
ansible.builtin.file:
|
||||
@@ -37,6 +38,7 @@
|
||||
--with github.com/corazawaf/coraza-caddy/v2@v{{ caddy_coraza_caddy_version }}
|
||||
--with github.com/mholt/caddy-ratelimit
|
||||
--with github.com/steffenbusch/caddy-bot-barrier
|
||||
--with github.com/zhangjiayin/caddy-geoip2
|
||||
--output /usr/local/bin/{{ caddy_my_name }}
|
||||
|
||||
- name: Remember and test Caddy version
|
||||
|
||||
Reference in New Issue
Block a user