We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents deadca2 + 7945cc7 commit a4c4776Copy full SHA for a4c4776
defaults/main.yml
@@ -0,0 +1,2 @@
1
+---
2
+windows_autologon_password: vagrant
tasks/Windows.yml
@@ -5,8 +5,8 @@
5
state: present
6
become: true
7
8
-- name: "Enable autologon for vagrant"
9
- ansible.windows.win_command: "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe vagrant . vagrant"
+- name: Enable autologon for vagrant
+ ansible.windows.win_command: powershell.exe Start-Process -FilePath "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe" -ArgumentList '"/accepteula" vagrant . {{ windows_autologon_password }}'
10
11
- name: Disable screen saver
12
ansible.windows.win_shell: Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord
0 commit comments