feat: sshd config

This commit is contained in:
2023-01-01 17:34:56 +01:00
parent 4f1b6bb06f
commit a8612074d8
3 changed files with 19 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
roles: roles:
- monitoring-client - monitoring-client
- monitoring-logs - monitoring-logs
- sshd-config
- hosts: monitoring - hosts: monitoring
roles: roles:

View File

@@ -0,0 +1,4 @@
- name: reload sshd
systemd:
name: sshd
state: reloaded

View File

@@ -0,0 +1,14 @@
- name: SSH Listen Port 7000
lineinfile:
path: /etc/ssh/sshd_config
line: 'Port 7000'
notify:
- reload sshd
- name: SSH Listen Port 22 (safety)
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#Port 22'
line: 'Port 22'
notify:
- reload sshd