Skip to content
Snippets Groups Projects
Commit 7b946d91 authored by Nico's avatar Nico
Browse files

add SSH role

This will for now only disable ssh password logins, when the variable
ssh_disable_password_login is set to yes.
parent 78af4bf3
No related branches found
No related tags found
No related merge requests found
...@@ -4,3 +4,4 @@ ...@@ -4,3 +4,4 @@
- users - users
- autoupdate - autoupdate
- revproxy - revproxy
- ssh
---
ssh_disable_password_login: yes
---
ssh_disable_password_login: no
---
- name: restart ssh
service:
name: ssh
state: restarted
---
- name: Disable SSH password login
lineinfile:
regexp: "^#?PasswordAuthentication"
line: "PasswordAuthentication no"
path: /etc/ssh/sshd_config
notify:
- restart ssh
when: ssh_disable_password_login
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment