--- - hosts: all tasks: - replace: path: /etc/ssh/sshd_config regexp: 'PermitRootLogin yes' replace: 'PermitRootLogin prohibit-password' backup: yes