Compare commits
3 Commits
5f00892df3
...
0db7911b70
Author | SHA1 | Date | |
---|---|---|---|
0db7911b70
|
|||
ee4c62e5f9
|
|||
a315db8a7c
|
@@ -36,7 +36,7 @@
|
|||||||
{% elif has_wordpress -%}
|
{% elif has_wordpress -%}
|
||||||
root * {{ document_root }}
|
root * {{ document_root }}
|
||||||
encode
|
encode
|
||||||
{% if ansible_distribution == 'Debian' and ansible_distribution_major_version is version('12', '==') -%}
|
{% if ansible_distribution_major_version is version('12', '==') -%}
|
||||||
php_fastcgi unix//run/php/php8.2-fpm-{{ domain_name }}.sock
|
php_fastcgi unix//run/php/php8.2-fpm-{{ domain_name }}.sock
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
file_server
|
file_server
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
provisioning ALL=(ALL) ALL
|
|
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
- name: Install fail2ban
|
- name: Install fail2ban
|
||||||
when: ansible_distribution_major_version is version('11', '>=')
|
when: ansible_distribution_version is version('11', '>=')
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name:
|
name:
|
||||||
- fail2ban
|
- fail2ban
|
||||||
|
@@ -2,14 +2,14 @@
|
|||||||
# Debian 11+ will use nftables directly, with no firewalld.
|
# Debian 11+ will use nftables directly, with no firewalld.
|
||||||
|
|
||||||
- name: Install Debian firewall packages
|
- name: Install Debian firewall packages
|
||||||
when: ansible_distribution_major_version is version('11', '>=')
|
when: ansible_distribution_version is version('11', '>=')
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: nftables
|
name: nftables
|
||||||
state: present
|
state: present
|
||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
|
|
||||||
- name: Remove iptables on newer Debian
|
- name: Remove iptables on newer Debian
|
||||||
when: ansible_distribution_major_version is version('11', '>=')
|
when: ansible_distribution_version is version('11', '>=')
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
pkg: iptables
|
pkg: iptables
|
||||||
state: absent
|
state: absent
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
ansible.builtin.include_tasks: nftables.yml
|
ansible.builtin.include_tasks: nftables.yml
|
||||||
|
|
||||||
- name: Configure fail2ban
|
- name: Configure fail2ban
|
||||||
when: ansible_distribution_major_version is version('9', '>=')
|
when: ansible_distribution_version is version('9', '>=')
|
||||||
ansible.builtin.include_tasks: fail2ban.yml
|
ansible.builtin.include_tasks: fail2ban.yml
|
||||||
|
|
||||||
# vim: set sw=2 ts=2:
|
# vim: set sw=2 ts=2:
|
||||||
|
@@ -6,14 +6,14 @@ PartOf=nftables.service
|
|||||||
PrivateDevices=yes
|
PrivateDevices=yes
|
||||||
PrivateTmp=yes
|
PrivateTmp=yes
|
||||||
ProtectHome=read-only
|
ProtectHome=read-only
|
||||||
{% if ansible_distribution == 'Debian' and ansible_distribution_major_version is version('11','>=') %}
|
{% if ansible_distribution_version is version('11','>=') %}
|
||||||
ProtectSystem=strict
|
ProtectSystem=strict
|
||||||
{% else %}
|
{% else %}
|
||||||
{# Older systemd versions don't have ProtectSystem=strict #}
|
{# Older systemd versions don't have ProtectSystem=strict #}
|
||||||
ProtectSystem=full
|
ProtectSystem=full
|
||||||
{% endif %}
|
{% endif %}
|
||||||
NoNewPrivileges=yes
|
NoNewPrivileges=yes
|
||||||
{% if ansible_distribution == 'Debian' and ansible_distribution_major_version is version('11','>=') %}
|
{% if ansible_distribution_version is version('11','>=') %}
|
||||||
ReadWritePaths=-/var/run/fail2ban
|
ReadWritePaths=-/var/run/fail2ban
|
||||||
ReadWritePaths=-/var/lib/fail2ban
|
ReadWritePaths=-/var/lib/fail2ban
|
||||||
ReadWritePaths=-/var/log/fail2ban.log
|
ReadWritePaths=-/var/log/fail2ban.log
|
||||||
|
@@ -77,7 +77,7 @@ server {
|
|||||||
# See: https://httpoxy.org/
|
# See: https://httpoxy.org/
|
||||||
fastcgi_param HTTP_PROXY "";
|
fastcgi_param HTTP_PROXY "";
|
||||||
|
|
||||||
{% if ansible_distribution == 'Debian' and ansible_distribution_major_version is version('12', '==') %}
|
{% if ansible_distribution_major_version is version('12', '==') %}
|
||||||
fastcgi_pass unix:/run/php/php8.2-fpm-{{ domain_name }}.sock;
|
fastcgi_pass unix:/run/php/php8.2-fpm-{{ domain_name }}.sock;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
|
Reference in New Issue
Block a user