init
This commit is contained in:
11
roles/sshd/files/sshd_config
Normal file
11
roles/sshd/files/sshd_config
Normal file
@ -0,0 +1,11 @@
|
||||
# Ansible managed
|
||||
|
||||
Include /etc/ssh/sshd_config.d/*.conf
|
||||
PermitRootLogin yes
|
||||
PasswordAuthentication no
|
||||
ChallengeResponseAuthentication no
|
||||
UsePAM yes
|
||||
X11Forwarding yes
|
||||
PrintMotd no
|
||||
AcceptEnv LANG LC_*
|
||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
4
roles/sshd/handlers/main.yaml
Normal file
4
roles/sshd/handlers/main.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
- name: Restart sshd
|
||||
ansible.builtin.service:
|
||||
name: sshd
|
||||
state: restarted
|
8
roles/sshd/tasks/main.yaml
Normal file
8
roles/sshd/tasks/main.yaml
Normal file
@ -0,0 +1,8 @@
|
||||
- name: Update sshd_config
|
||||
ansible.builtin.copy:
|
||||
src: sshd_config
|
||||
dest: /etc/ssh/sshd_config
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
notify: Restart sshd
|
Reference in New Issue
Block a user