mirror of
https://github.com/FAUSheppy/no-secrets-athq-ansible
synced 2025-12-06 12:01:37 +01:00
feat: sshd config
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
roles:
|
||||
- monitoring-client
|
||||
- monitoring-logs
|
||||
- sshd-config
|
||||
|
||||
- hosts: monitoring
|
||||
roles:
|
||||
|
||||
4
roles/sshd-config/handlers/main.yml
Normal file
4
roles/sshd-config/handlers/main.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
- name: reload sshd
|
||||
systemd:
|
||||
name: sshd
|
||||
state: reloaded
|
||||
14
roles/sshd-config/tasks/main.yaml
Normal file
14
roles/sshd-config/tasks/main.yaml
Normal 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
|
||||
Reference in New Issue
Block a user