Compare commits
5 Commits
37e148d009
...
9357265d27
| Author | SHA1 | Date | |
|---|---|---|---|
|
9357265d27
|
|||
|
dd62266340
|
|||
|
a1bec20824
|
|||
|
8e91c44529
|
|||
|
02d4135c79
|
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
- name: Install fail2ban
|
- name: Install fail2ban
|
||||||
when: ansible_distribution_major_version is version('11', '>=')
|
when: ansible_distribution_major_version is version('11', '>=')
|
||||||
ansible.builtin.package:
|
ansible.builtin.apt:
|
||||||
name:
|
name:
|
||||||
- fail2ban
|
- fail2ban
|
||||||
- python3-systemd
|
- python3-systemd
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
- name: Install Debian firewall packages
|
- name: Install Debian firewall packages
|
||||||
when: ansible_distribution_major_version is version('11', '>=')
|
when: ansible_distribution_major_version is version('11', '>=')
|
||||||
ansible.builtin.package:
|
ansible.builtin.apt:
|
||||||
name: nftables
|
name: nftables
|
||||||
state: present
|
state: present
|
||||||
cache_valid_time: 3600
|
cache_valid_time: 3600
|
||||||
|
|||||||
@@ -12,11 +12,9 @@
|
|||||||
|
|
||||||
# Apparently some cloud images don't have this installed by default. From what
|
# Apparently some cloud images don't have this installed by default. From what
|
||||||
# I can see on existing servers, systemd-timesyncd is a standalone package on
|
# I can see on existing servers, systemd-timesyncd is a standalone package on
|
||||||
# Debian 11.
|
# Debian 11 and Debian 12.
|
||||||
- name: Install systemd-timesyncd
|
- name: Install systemd-timesyncd
|
||||||
when:
|
when: ansible_distribution_version is version('11', '>=')
|
||||||
- ansible_distribution == 'Debian'
|
|
||||||
- ansible_distribution_version is version('11', '>='))
|
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: systemd-timesyncd
|
name: systemd-timesyncd
|
||||||
state: present
|
state: present
|
||||||
@@ -29,8 +27,12 @@
|
|||||||
state: started
|
state: started
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|
||||||
- name: Uninstall ntp on modern Debian
|
# On Debian 12 ntp doesn't conflict with systemd-timesyncd so we should try to
|
||||||
when: ansible_service_mgr == 'systemd'
|
# remove it to be sure.
|
||||||
|
- name: Uninstall ntp on Debian 12
|
||||||
|
when:
|
||||||
|
- ansible_service_mgr == 'systemd'
|
||||||
|
- ansible_distribution_major_version is version('12', '==')
|
||||||
ansible.builtin.apt:
|
ansible.builtin.apt:
|
||||||
name: ntp
|
name: ntp
|
||||||
state: absent
|
state: absent
|
||||||
|
|||||||
Reference in New Issue
Block a user