homeserver/playbooks/on-off/activate_ssh_password_login.yml

23 lines
492 B
YAML
Raw Normal View History

2021-02-14 14:53:52 +01:00
---
- hosts: proxmox
become: yes
tasks:
- name: allow ssh login with password
become: yes
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: 'PasswordAuthentication no'
line: '#PasswordAuthentication yes'
state: present
validate: "/usr/sbin/sshd -T -f %s"
notify: restart_sshd
handlers:
- name: restart_sshd
become: yes
systemd:
name: sshd
enabled: yes
state: restarted