Fix ssh auth config settings labels

This commit is contained in:
Ethan Paul 2021-11-06 22:14:20 -04:00
parent fe0cd3ab67
commit 4069d8a77a
No known key found for this signature in database
GPG Key ID: 6A337337DF6B5B1A

View File

@ -7,20 +7,16 @@
replace: "{{ item.value }}" replace: "{{ item.value }}"
notify: [restart-sshd] notify: [restart-sshd]
loop: loop:
- name: disable root login - regex: "^.*PermitRootLogin (yes|no).*$"
regex: "^.*PermitRootLogin (yes|no).*$"
value: PermitRootLogin no value: PermitRootLogin no
- name: disable password auth - regex: "^.*PasswordAuthentication (yes|no).*$"
regex: "^.*PasswordAuthentication (yes|no).*$"
value: PasswordAuthentication no value: PasswordAuthentication no
- name: disable challenge response auth - regex: "^.*ChallengeResponseAuthentication (yes|no).*$"
regex: "^.*ChallengeResponseAuthentication (yes|no).*$"
value: ChallengeResponseAuthentication no value: ChallengeResponseAuthentication no
- name: disable GSSAPI auth - regex: "^.*GSSAPIAuthentication (yes|no).*$"
regex: "^.*GSSAPIAuthentication (yes|no).*$"
value: GSSAPIAuthentication no value: GSSAPIAuthentication no
loop_control: loop_control:
label: "{{ item.name }}" label: "{{ item.value }}"
- name: Disable dynamic MOTD on debian systems - name: Disable dynamic MOTD on debian systems
when: ansible_os_family == "Debian" when: ansible_os_family == "Debian"