diff options
Diffstat (limited to 'roles/fedora/tasks')
-rw-r--r-- | roles/fedora/tasks/sshd.yml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/fedora/tasks/sshd.yml b/roles/fedora/tasks/sshd.yml index fc46c07..163a6af 100644 --- a/roles/fedora/tasks/sshd.yml +++ b/roles/fedora/tasks/sshd.yml @@ -28,11 +28,15 @@ path: '/etc/ssh/sshd_config' regexp: '{{ item.regexp }}' line: '{{ item.line }}' + insertafter: '{{ (item.insertafter is string)|ternary(item.insertafter,omit) }}' with_items: - regexp: '^#*PermitRootLogin' line: 'PermitRootLogin no' - regexp: '^#*PasswordAuthentication' line: 'PasswordAuthentication no' + - regexp: '^#*AuthenticationMethods' + line: 'AuthenticationMethods publickey' + insertafter: '^#*PasswordAuthentication' - regexp: '^#*GSSAPIAuthentication' line: 'GSSAPIAuthentication no' notify: restart sshd |