Compare commits
5 Commits
547395b26e
...
635bb5234d
Author | SHA1 | Date | |
---|---|---|---|
635bb5234d
|
|||
37901da5b5
|
|||
e36ae3b11e
|
|||
81c1231a28
|
|||
bb6f058025
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,7 @@
|
||||
#!/usr/sbin/nft -f
|
||||
|
||||
define ABUSEIPDB_IPV6 = {
|
||||
2001:41d0:8:8c1::,
|
||||
2400:6180:0:d1::8c9:8001,
|
||||
2607:5300:203:3b58::,
|
||||
2607:f298:5:102f::97c:9b51,
|
||||
2607:f298:5:103f::cf7:8a8e,
|
||||
2607:f298:5:6000::f25:8518,
|
||||
2607:f298:6:a016::448:ebe6,
|
||||
2607:f298:6:a034::eb5:2e70,
|
||||
2a00:d680:20:50::68b6,
|
||||
2a06:41c0:0:1::e4ca:8524,
|
||||
2400:6180:0:d1::4ce:d001,
|
||||
2607:5300:60:232d::,
|
||||
2607:f298:6:a066::1bf:e80e,
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3,21 +3,7 @@
|
||||
<option name="family" value="inet6" />
|
||||
<short>abusers-ipv6</short>
|
||||
<description>A list of abusive IPv6 addresses.</description>
|
||||
<entry>2001:41d0:700:1a2c::</entry>
|
||||
<entry>2400:6180:0:d0::63:e001</entry>
|
||||
<entry>2400:6180:0:d0::6a:4001</entry>
|
||||
<entry>2604:a880:2:d0::22d5:c001</entry>
|
||||
<entry>2604:a880:2:d1::19c:1001</entry>
|
||||
<entry>2604:a880:cad:d0::169:3001</entry>
|
||||
<entry>2607:5300:203:2519::</entry>
|
||||
<entry>2607:5300:203:4418::</entry>
|
||||
<entry>2607:5300:203:d86::</entry>
|
||||
<entry>2607:5300:60:1e52::</entry>
|
||||
<entry>2607:5300:61:404::</entry>
|
||||
<entry>2607:f298:5:115b::bcf:e319</entry>
|
||||
<entry>2607:f298:5:6000::864:52c7</entry>
|
||||
<entry>2607:f298:6:a044::d7d:2305</entry>
|
||||
<entry>2607:f298:6:a077::491:e10b</entry>
|
||||
<entry>2a00:d680:20:50::4a10</entry>
|
||||
<entry>2a03:6f00:6:1::b972:f5c1</entry>
|
||||
<entry>2400:6180:0:d1::4ce:d001</entry>
|
||||
<entry>2607:5300:60:232d::</entry>
|
||||
<entry>2607:f298:6:a066::1bf:e80e</entry>
|
||||
</ipset>
|
||||
|
@ -36,13 +36,13 @@
|
||||
|
||||
- name: Copy extra nftables configuration files
|
||||
when: ansible_distribution_major_version is version('11', '>=')
|
||||
copy: src={{ item }} dest=/etc/nftables/{{ item }} owner=root group=root mode=0644 force=no
|
||||
copy: src={{ item.src }} dest=/etc/nftables/{{ item.src }} owner=root group=root mode=0644 force={{ item.force }}
|
||||
loop:
|
||||
- spamhaus-ipv4.nft
|
||||
- spamhaus-ipv6.nft
|
||||
- abusech-ipv4.nft
|
||||
- abuseipdb-ipv4.nft
|
||||
- abuseipdb-ipv6.nft
|
||||
- { src: "spamhaus-ipv4.nft", force: "no" }
|
||||
- { src: "spamhaus-ipv6.nft", force: "no" }
|
||||
- { src: "abusech-ipv4.nft", force: "no" }
|
||||
- { src: "abuseipdb-ipv4.nft", force: "yes" }
|
||||
- { src: "abuseipdb-ipv6.nft", force: "yes" }
|
||||
notify:
|
||||
- restart nftables
|
||||
|
||||
|
@ -42,13 +42,13 @@
|
||||
|
||||
- name: Copy extra nftables configuration files
|
||||
when: ansible_distribution_version is version('20.04', '>=')
|
||||
copy: src={{ item }} dest=/etc/nftables/{{ item }} owner=root group=root mode=0644 force=no
|
||||
copy: src={{ item.src }} dest=/etc/nftables/{{ item.src }} owner=root group=root mode=0644 force={{ item.force }}
|
||||
loop:
|
||||
- spamhaus-ipv4.nft
|
||||
- spamhaus-ipv6.nft
|
||||
- abusech-ipv4.nft
|
||||
- abuseipdb-ipv4.nft
|
||||
- abuseipdb-ipv6.nft
|
||||
- { src: "spamhaus-ipv4.nft", force: "no" }
|
||||
- { src: "spamhaus-ipv6.nft", force: "no" }
|
||||
- { src: "abusech-ipv4.nft", force: "no" }
|
||||
- { src: "abuseipdb-ipv4.nft", force: "yes" }
|
||||
- { src: "abuseipdb-ipv6.nft", force: "yes" }
|
||||
notify:
|
||||
- restart nftables
|
||||
|
||||
|
@ -28,7 +28,8 @@
|
||||
- name: Update php.ini
|
||||
template: src=php7.3-php.ini.j2 dest=/etc/php/7.3/fpm/php.ini owner=root group=root mode=0644
|
||||
notify: reload php7.3-fpm
|
||||
|
||||
tags: php-fpm
|
||||
when: (item.has_wordpress is defined and item.has_wordpress) or (item.needs_php is defined and item.needs_php)
|
||||
when: install_php
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
@ -28,7 +28,8 @@
|
||||
- name: Update php.ini
|
||||
template: src=php7.2-php.ini.j2 dest=/etc/php/7.2/fpm/php.ini owner=root group=root mode=0644
|
||||
notify: reload php7.2-fpm
|
||||
|
||||
tags: php-fpm
|
||||
when: (item.has_wordpress is defined and item.has_wordpress) or (item.needs_php is defined and item.needs_php)
|
||||
when: install_php
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
@ -28,7 +28,8 @@
|
||||
- name: Update php.ini
|
||||
template: src=php7.4-php.ini.j2 dest=/etc/php/7.4/fpm/php.ini owner=root group=root mode=0644
|
||||
notify: reload php7.4-fpm
|
||||
|
||||
tags: php-fpm
|
||||
when: (item.has_wordpress is defined and item.has_wordpress) or (item.needs_php is defined and item.needs_php)
|
||||
when: install_php
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
@ -4,25 +4,47 @@
|
||||
# Ubuntu 20.04 uses PHP 7.4
|
||||
# Debian 11 uses PHP 7.4
|
||||
|
||||
# If any of the vhosts on this host need WordPress then we need to install PHP.
|
||||
# This uses selectattr to filter the list of dicts in nginx_vhosts, selecting
|
||||
# any that have has_wordpress defined, and has_wordpress set to True.
|
||||
#
|
||||
# See: https://stackoverflow.com/a/31896249
|
||||
- name: Check if any vhost needs WordPress
|
||||
set_fact:
|
||||
install_php: True
|
||||
when: "nginx_vhosts | selectattr('has_wordpress', 'defined') | selectattr('has_wordpress', 'equalto', True) | list | length > 0"
|
||||
|
||||
# Legacy, was only for Piwik, but leaving for now.
|
||||
- name: Check if any vhost needs PHP
|
||||
set_fact:
|
||||
install_php: True
|
||||
when: "nginx_vhosts | selectattr('needs_php', 'defined') | selectattr('needs_php', 'equalto', True) | list | length > 0"
|
||||
|
||||
# If install_php has not been set, then we assume no vhosts need PHP. This is
|
||||
# a bit hacky, but it's the closest we come to an if/then/else.
|
||||
- name: Set install_php to False
|
||||
set_fact:
|
||||
install_php: False
|
||||
when: install_php is not defined
|
||||
|
||||
- name: Configure php-fpm on Ubuntu 18.04
|
||||
include_tasks: Ubuntu_18.04.yml
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('18.04', '==')
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('18.04', '==') and install_php
|
||||
tags: php-fpm
|
||||
|
||||
- name: Configure php-fpm on Debian 10
|
||||
include_tasks: Debian_10.yml
|
||||
when: ansible_distribution == 'Debian' and ansible_distribution_version is version('10', '==')
|
||||
when: ansible_distribution == 'Debian' and ansible_distribution_version is version('10', '==') and install_php
|
||||
tags: php-fpm
|
||||
|
||||
- name: Configure php-fpm on Ubuntu 20.04
|
||||
include_tasks: Ubuntu_20.04.yml
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '==')
|
||||
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version('20.04', '==') and install_php
|
||||
tags: php-fpm
|
||||
|
||||
- name: Configure php-fpm on Debian 11
|
||||
include_tasks: Ubuntu_20.04.yml
|
||||
when: ansible_distribution == 'Debian' and ansible_distribution_version is version('11', '==')
|
||||
when: ansible_distribution == 'Debian' and ansible_distribution_version is version('11', '==') and install_php
|
||||
tags: php-fpm
|
||||
|
||||
|
||||
# vim: set ts=2 sw=2:
|
||||
|
Reference in New Issue
Block a user