add ufw and mosh roles

This commit is contained in:
Václav Uruba 2023-08-30 15:27:58 +02:00
parent 39c2b425bd
commit b8d26d4938
Signed by: uruba
GPG Key ID: 9D8E987C4B2E1E9C
4 changed files with 27 additions and 0 deletions

View File

@ -2,6 +2,8 @@
hosts: all hosts: all
roles: roles:
- users - users
- ufw
- mosh
- python3 - python3
- docker - docker
- htop - htop

View File

@ -0,0 +1,3 @@
---
dependencies:
- role: ufw

View File

@ -0,0 +1,10 @@
---
- name: Install mosh
ansible.builtin.package:
name: mosh
state: present
- name: Allow mosh in ufw
community.general.ufw:
rule: allow
port: 60000:61000
proto: udp

View File

@ -0,0 +1,12 @@
---
- name: Install ufw
ansible.builtin.package:
name: ufw
state: present
- name: Allow SSH connection in ufw
community.general.ufw:
rule: allow
name: OpenSSH
- name: Enable ufw
community.general.ufw:
state: enabled