From 8c39ca8ad06df4be4c508d4d0807a8825f0ede0c Mon Sep 17 00:00:00 2001 From: Jordan Layfield Date: Thu, 18 Jul 2024 12:41:51 +0100 Subject: [PATCH 1/6] update password for login TO-246 --- tasks/Windows.yml | 2 +- vars/Windows.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 vars/Windows.yml diff --git a/tasks/Windows.yml b/tasks/Windows.yml index f34751b..49623b6 100644 --- a/tasks/Windows.yml +++ b/tasks/Windows.yml @@ -6,7 +6,7 @@ become: true - name: "Enable autologon for vagrant" - ansible.windows.win_command: "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe vagrant . vagrant" + ansible.windows.win_command: "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe vagrant . {{ ansible_password }}" - name: Disable screen saver ansible.windows.win_shell: Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord diff --git a/vars/Windows.yml b/vars/Windows.yml new file mode 100644 index 0000000..6778226 --- /dev/null +++ b/vars/Windows.yml @@ -0,0 +1 @@ +ansible_password: vagrant \ No newline at end of file From 3e9b19c11c8d7f3677c9c2c6faf4e14eb63c7014 Mon Sep 17 00:00:00 2001 From: Jordan Layfield Date: Thu, 18 Jul 2024 13:08:18 +0100 Subject: [PATCH 2/6] quick fix TO-246 --- tasks/Windows.yml | 2 +- vars/Windows.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/Windows.yml b/tasks/Windows.yml index 49623b6..3a5ff11 100644 --- a/tasks/Windows.yml +++ b/tasks/Windows.yml @@ -6,7 +6,7 @@ become: true - name: "Enable autologon for vagrant" - ansible.windows.win_command: "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe vagrant . {{ ansible_password }}" + ansible.windows.win_command: "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe vagrant . {{ windows_ansible_password }}" - name: Disable screen saver ansible.windows.win_shell: Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord diff --git a/vars/Windows.yml b/vars/Windows.yml index 6778226..58a5abc 100644 --- a/vars/Windows.yml +++ b/vars/Windows.yml @@ -1 +1 @@ -ansible_password: vagrant \ No newline at end of file +windows_ansible_password: vagrant \ No newline at end of file From f081a9bc18db63091756cccaba3c23086a363d4a Mon Sep 17 00:00:00 2001 From: Jordan Layfield Date: Thu, 18 Jul 2024 16:08:42 +0100 Subject: [PATCH 3/6] new process for autologin TO-246 --- defaults/main.yml | 1 + tasks/Windows.yml | 4 ++-- vars/Windows.yml | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 defaults/main.yml delete mode 100644 vars/Windows.yml diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..eab78c8 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1 @@ +windows_autologin_password: vagrant \ No newline at end of file diff --git a/tasks/Windows.yml b/tasks/Windows.yml index 3a5ff11..c4f0d0c 100644 --- a/tasks/Windows.yml +++ b/tasks/Windows.yml @@ -5,8 +5,8 @@ state: present become: true -- name: "Enable autologon for vagrant" - ansible.windows.win_command: "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe vagrant . {{ windows_ansible_password }}" +- name: Enable autologon for vagrant + ansible.windows.win_command: powershell.exe Start-Process -FilePath "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe" -ArgumentList '"/accepteula" vagrant . {{ windows_autologin_password }}' - name: Disable screen saver ansible.windows.win_shell: Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord diff --git a/vars/Windows.yml b/vars/Windows.yml deleted file mode 100644 index 58a5abc..0000000 --- a/vars/Windows.yml +++ /dev/null @@ -1 +0,0 @@ -windows_ansible_password: vagrant \ No newline at end of file From c6ddbfd7ad77e55039eb45c148b4d8dbcf43982c Mon Sep 17 00:00:00 2001 From: Jordan Layfield Date: Thu, 18 Jul 2024 16:09:44 +0100 Subject: [PATCH 4/6] match the name TO-246 --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index eab78c8..2ba7dcf 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1 +1 @@ -windows_autologin_password: vagrant \ No newline at end of file +windows_autologon_password: vagrant \ No newline at end of file From abf127491bcafd01ca4082a554c9c37d8a43330f Mon Sep 17 00:00:00 2001 From: Jordan Layfield Date: Thu, 18 Jul 2024 16:10:04 +0100 Subject: [PATCH 5/6] and here TO-246 --- tasks/Windows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/Windows.yml b/tasks/Windows.yml index c4f0d0c..7895634 100644 --- a/tasks/Windows.yml +++ b/tasks/Windows.yml @@ -6,7 +6,7 @@ become: true - name: Enable autologon for vagrant - ansible.windows.win_command: powershell.exe Start-Process -FilePath "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe" -ArgumentList '"/accepteula" vagrant . {{ windows_autologin_password }}' + ansible.windows.win_command: powershell.exe Start-Process -FilePath "C:\\ProgramData\\chocolatey\\bin\\Autologon.exe" -ArgumentList '"/accepteula" vagrant . {{ windows_autologon_password }}' - name: Disable screen saver ansible.windows.win_shell: Set-ItemProperty "HKCU:\Control Panel\Desktop" -Name ScreenSaveActive -Value 0 -Type DWord From 7945cc7938fd87056f3377a3ef3bb3e1fee7770a Mon Sep 17 00:00:00 2001 From: Jordan Layfield Date: Thu, 18 Jul 2024 17:11:08 +0100 Subject: [PATCH 6/6] lint fix TO-246 --- defaults/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 2ba7dcf..9ed2e19 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1 +1,2 @@ -windows_autologon_password: vagrant \ No newline at end of file +--- +windows_autologon_password: vagrant