Ansible on mojave works A1. Winrm is enabled on the windows 10 home machine. I have setup a windows update play that reboots the machine. The problem is it reboots but then i have to login manually.

Maybe someone has an idea on how to automate that part ? is there a module that i could use ?

- name: Install windows updates
        - SecurityUpdates
        - CriticalUpdates
        - UpdateRollups
    reboot: yes

1 Answers

Martin Vincent On Best Solutions

look at :

Its a bit of a hack, but it does permit a user to autologon, in unattended mode.

I usually simply copy the autologon exec to 'Program Files' (ansible module win_copy), and then run it with CLI params (using ansible-vault of course; the password is hashed in the win registry... not super secure, but for my use-case, it is sufficient):

- name: Sync the contents of autologon directory
    src: "E:\\install_packages\\Autologon"
    dest: "C:\\Program Files\\Autologon"

- name: Configure autologon
  win_command: "C:\\Program Files\\Autologon.exe <username> <domain> <password>"