Add sshd_config
This commit is contained in:
parent
6fc0f44412
commit
7e4af01df3
3 changed files with 21 additions and 0 deletions
7
roles/common/handlers/main.yml
Normal file
7
roles/common/handlers/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
|
||||
- name: Restart sshd service
|
||||
become: true
|
||||
ansible.builtin.systemd:
|
||||
name: sshd
|
||||
state: restarted
|
|
@ -28,3 +28,13 @@
|
|||
- name: Setup etckeeper
|
||||
ansible.builtin.include_role:
|
||||
name: etckeeper
|
||||
|
||||
- name: Copy sshd_config
|
||||
become: true
|
||||
ansible.builtin.template:
|
||||
src: sshd_config.j2
|
||||
dest: /etc/ssh/sshd_config.d/00-lime2.conf
|
||||
mode: "644"
|
||||
owner: root
|
||||
group: root
|
||||
notify: Restart sshd service
|
||||
|
|
4
roles/common/templates/sshd_config.j2
Normal file
4
roles/common/templates/sshd_config.j2
Normal file
|
@ -0,0 +1,4 @@
|
|||
# {{ ansible_managed }}
|
||||
|
||||
PermitRootLogin no
|
||||
PasswordAuthentication no
|
Loading…
Reference in a new issue