home lab init
This commit is contained in:
commit
7278922625
65 changed files with 27336 additions and 0 deletions
16
ansible/books/tasks/users.yml
Normal file
16
ansible/books/tasks/users.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
- name: Disable PasswordAuthentication in sshd_config
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "^PasswordAuthentication"
|
||||
line: "PasswordAuthentication no"
|
||||
|
||||
- name: Disable KbdInteractiveAuthentication in sshd_config
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "^KbdInteractiveAuthentication"
|
||||
line: "KbdInteractiveAuthentication no"
|
||||
|
||||
- name: Restart sshd to apply changes
|
||||
ansible.builtin.service:
|
||||
name: ssh
|
||||
state: restarted
|
||||
Loading…
Add table
Add a link
Reference in a new issue