Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows ansible updates #3211

Merged
merged 4 commits into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions ansible/MANUAL_STEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,9 +617,35 @@ Install the `pywinrm` pip module: `pip install pywinrm`
The preparation script needs to be run in PowerShell (run as Administrator):

```powershell
iwr -useb https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1 | iex
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1" -OutFile "ConfigureRemotingForAnsible.ps1"
.\ConfigureRemotingForAnsible.ps1 -ForceNewSSLCert true -CertValidityDays 3650
```

#### Port Configuration

Delete the unencrypted WinRM endpoint:

```powershell
winrm delete winrm/config/Listener?Address=*+Transport=HTTP
```

On Rackspace hosts, it is necessary to change the port to match the value found in secrets (change 12345):

```powershell
winrm set winrm/config/Listener?Address=*+Transport=HTTPS '@{Port="12345"}'
```

On Azure, changing the ports is done in the Load Balancer configuration using the Azure Portal.

To see the status of running listeners:

```powershell
winrm enumerate winrm/config/listener
```

#### Test

Test the connection to the target machine with `ansible HOST -m win_ping -vvvv`. If there is any issue, please refer to the official Ansible documentation in [Setting up a Windows Host][].

## jenkins-workspace
Expand Down Expand Up @@ -734,9 +760,6 @@ NFS_BOOT_SERVER_IP:PATH_TO_TFTP_BOOT_EXPORT /boot nfs4 nfsvers=3,rw,noexec,async

After these steps are performed and the Pi's are running, Ansible can be run to finish setup. A reboot is recommended after initial setup to ensure the environment is configured correctly (locale and other settings that are changed).

[Setting up a Windows Host]: https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html
[newer Ansible configuration]: https://github.com/nodejs/build/tree/main/ansible
[stand-alone]: https://github.com/nodejs/build/tree/main/setup/windows

## IBM i

Expand Down Expand Up @@ -800,3 +823,9 @@ mkdir -p /u/unix1/java
cd /u/unix1/java
pax -rf /u/unix1/SDK8_64bit_SR6_FP10.PAX.Z -ppx
```



[Setting up a Windows Host]: https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html
[newer Ansible configuration]: https://github.com/nodejs/build/tree/main/ansible
[stand-alone]: https://github.com/nodejs/build/tree/main/setup/windows
6 changes: 6 additions & 0 deletions ansible/inventory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ hosts:
msft-win10_vs2019-x64-2: {ip: nodejs.westus3.cloudapp.azure.com}
msft-win10_vs2019-x64-3: {ip: nodejs.australiaeast.cloudapp.azure.com}
msft-win10_vs2019-x64-4: {ip: nodejs2.eastus.cloudapp.azure.com}
msft-win11_vs2019-arm64-1: {ip: nodejs.westeurope.cloudapp.azure.com}
msft-win11_vs2019-arm64-2: {ip: nodejs2.eastus.cloudapp.azure.com}
msft-win11_vs2019-arm64-3: {ip: nodejs.westeurope.cloudapp.azure.com}
msft-win11_vs2019-arm64-4: {ip: nodejs2.eastus.cloudapp.azure.com}
msft-win11_vs2019-arm64-5: {ip: nodejs.westeurope.cloudapp.azure.com}
msft-win11_vs2019-arm64-6: {ip: nodejs2.eastus.cloudapp.azure.com}
msft-win2016_vs2017-x64-1: {ip: nodejs.westeurope.cloudapp.azure.com}
msft-win2016_vs2017-x64-2: {ip: nodejs.westus3.cloudapp.azure.com}
msft-win2016_vs2017-x64-3: {ip: nodejs.australiaeast.cloudapp.azure.com}
Expand Down
14 changes: 14 additions & 0 deletions ansible/roles/bootstrap/tasks/partials/win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,17 @@
name: Enabled
data: 0
type: dword

- block:
- name: disable Let's Finish Setting up Your Device screen
win_regedit:
path: 'HKCU:\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement'
name: ScoobeSystemSettingEnabled
data: 0
type: dword
- name: disable Windows Welcome Experience
win_regedit:
path: 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager'
name: SubscribedContent-310093Enabled
data: 0
type: dword
3 changes: 2 additions & 1 deletion ansible/roles/visual-studio/tasks/partials/vs2019.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
- name: install Visual Studio Community 2019
win_chocolatey: name=visualstudio2019community

# Note: The .NET SDK was added as a prerequisite for WiX4 - https://github.com/nodejs/node/pull/45943
- name: install Visual Studio Community 2019 Native Desktop Workload
win_chocolatey:
name: visualstudio2019-workload-nativedesktop
params: '--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.ATL.ARM64'
params: '--add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Component.VC.ATL.ARM64 --add Microsoft.NetCore.Component.SDK'

- name: install WiX Toolset
import_tasks: 'wixtoolset.yml'
Expand Down