--- - name: Ensure SSH password authentication is enabled ansible.builtin.lineinfile: path: /mnt/etc/ssh/sshd_config regexp: "^#?PasswordAuthentication\\s+" line: "PasswordAuthentication yes" - name: SSH permit root login ansible.builtin.replace: path: /mnt/etc/ssh/sshd_config regexp: "^#?PermitRootLogin.*" replace: "PermitRootLogin yes"