-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.33 KB
/
wsl.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
name: WSL
on:
pull_request:
types: ['opened', 'synchronize']
jobs:
Windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-server-2019
- windows-server-2022
distro:
- Ubuntu-20.04
- Debian
defaults:
run:
shell: wsl-bash {0}
steps:
- name: Create an admin user
shell: cmd
run: |
net user admin pass123@ /add /y
net localgroup Administrators admin /add
- name: Set up the runner for PowerShell remoting
shell: powershell
run: Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))
- uses: Vampire/setup-wsl@v1
with:
distribution: ${{ matrix.distro }}
additional-packages: |
git
python
- name: Let's install Ansible and stuff?
run: |
pip install --upgrade pip
pip install ansible-core pywinrm pypsrp
- name: Can we run something?
run: |
ansible --version
ansible localhost -m win_ping -e "ansible_connection=psrp ansible_port=5986 ansible_user=admin ansible_password=pass123@ ansible_psrp_auth=basic ansible_psrp_cert_validation=ignore"