--- - name: Ping host ansible.windows.win_ping: - name: Copy SSH key to host ansible.windows.win_copy: src: id_ed25519.pub dest: "C:\\ProgramData\\ssh\\administrators_authorized_keys" - name: Hide backup user from login screen ansible.windows.win_regedit: path: "HKLM:\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon\\SpecialAccounts\\UserList" name: backup type: dword data: 0 - name: Upload SSH config to host ansible.windows.win_copy: src: sshd_config dest: "C:\\ProgramData\\ssh\\sshd_config" - name: Restart sshd service ansible.windows.win_service: name: sshd state: restarted