Updates to segregate configs by device class
Split cloud VMs out from local VMs in 'cloud' group Generalize networkd install/config Generalize sshd config Create general update playbook Add host vm-host-nextcloud
This commit is contained in:
13
tasks/sshd/banner.yml
Normal file
13
tasks/sshd/banner.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
- name: Install SSH Banner
|
||||
become: true
|
||||
template:
|
||||
src: motd.j2
|
||||
dest: /etc/issue.net
|
||||
mode: 0644
|
||||
|
||||
- name: Configure SSH banner
|
||||
become: true
|
||||
lineinfile:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: '#Banner none'
|
||||
line: 'Banner /etc/issue.net'
|
25
tasks/sshd/disable-password-auth.yml
Normal file
25
tasks/sshd/disable-password-auth.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
- name: Turn off password authentication
|
||||
become: true
|
||||
replace:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "PasswordAuthentication yes"
|
||||
replace: "PasswordAuthentication no"
|
||||
|
||||
- name: Turn off challenge response authentication
|
||||
become: true
|
||||
replace:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "ChallengeResponseAuthentication yes"
|
||||
replace: "ChallengeResponseAuthentication no"
|
||||
|
||||
- name: Turn off GSSAPI authentication
|
||||
become: true
|
||||
replace:
|
||||
path: /etc/ssh/sshd_config
|
||||
regexp: "GSSAPIAuthentication yes"
|
||||
replace: "GSSAPIAuthentication no"
|
||||
|
||||
- name: Restart sshd
|
||||
service:
|
||||
name: sshd
|
||||
state: restarted
|
Reference in New Issue
Block a user