ssh - add ansible login restrictions
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
- name: SSH | configure ansible login restrictions
|
||||
template:
|
||||
src: sshd_ansible_conf.j2
|
||||
dest: /etc/ssh/sshd_config.d/ansible.conf
|
||||
mode: '0644'
|
||||
validate: /usr/sbin/sshd -t -f %s
|
||||
when: ssh_ansible_authorized_ips is defined
|
||||
register: sshd_conf_changes
|
||||
|
||||
- name: SSH | configure root login restrictions
|
||||
template:
|
||||
src: sshd_root_conf.j2
|
||||
|
||||
Reference in New Issue
Block a user