This commit is contained in:
bee
2026-05-30 23:17:43 +02:00
parent 34d8d82dbf
commit fdc99031dd
22 changed files with 219 additions and 77 deletions
+22 -1
View File
@@ -1,5 +1,5 @@
- name: Fail2ban
hosts: pi
hosts: beepi
become: true
tasks:
@@ -8,6 +8,27 @@
name: fail2ban
state: present
- name: Create user
ansible.builtin.user:
name: fail2forward
create_home: true
- name: Create key
ansible.builtin.user:
name: fail2forward
generate_ssh_key: true
ssh_key_bits: 2048
ssh_key_file: .ssh/id_rsa
register: ssh_public_key
- name: Save public key locally
ansible.builtin.copy:
content: "{{ ssh_public_key.ssh_public_key }}"
dest: ./fail2forward_id_rsa.pub
mode: '0644'
delegate_to: localhost
become: false
- name: Copy jail.local
ansible.builtin.template:
src: jail.local.j2