Skip to content

Commit a4c4776

Browse files
Merge pull request #39 from ccdc-opensource/update-autologin
Update autologin
2 parents deadca2 + 7945cc7 commit a4c4776

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

defaults/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
windows_autologon_password: vagrant

tasks/Windows.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
state: present
66
become: true
77

8-
- name: "Enable autologon for vagrant"
9-
ansible.windows.win_command: "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe vagrant . vagrant"
8+
- name: Enable autologon for vagrant
9+
ansible.windows.win_command: powershell.exe Start-Process -FilePath "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe" -ArgumentList '"/accepteula" vagrant . {{ windows_autologon_password }}'
1010

1111
- name: Disable screen saver
1212
ansible.windows.win_shell: Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord

0 commit comments

Comments
 (0)