homeserver/playbooks/on-off/activate_ssh_password_login...

23 lines
492 B
YAML

---
- 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