Add unatended xml and windows activation

This commit is contained in:
L3D 2022-12-31 20:11:33 +01:00
parent e0ed8cdf8d
commit acd0da51f6
Signed by: l3d
GPG key ID: CD08445BFF4313D1
7 changed files with 19 additions and 2 deletions

3
.gitmodules vendored
View file

@ -40,3 +40,6 @@
[submodule "roles/do1jlr.win_rdp"] [submodule "roles/do1jlr.win_rdp"]
path = roles/do1jlr.win_rdp path = roles/do1jlr.win_rdp
url = https://backwesen.de/voc/win_ansible_role_rdp.git url = https://backwesen.de/voc/win_ansible_role_rdp.git
[submodule "roles/do1jlr.win_activation"]
path = roles/do1jlr.win_activation
url = https://backwesen.de/voc/win_ansible_role_activating.git

View file

@ -68,6 +68,10 @@ After you installed the required deploy host python packages you can verify that
ansible -m win_ping all ansible -m win_ping all
``` ```
Windows Installation
----------------------
There is a prepared [autounattend.xml](autounattend.xml) to automate the windows installation.
Ad-hoc copy file example: Ad-hoc copy file example:
---------------------------- ----------------------------
```bash ```bash

View file

@ -207,12 +207,18 @@ Notes: Enter your comments here...
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>3</Order> <Order>3</Order>
<Description>autostart OpenSSH</Description> <Description>tart OpenSSH</Description>
<RequiresUserInput>false</RequiresUserInput> <RequiresUserInput>false</RequiresUserInput>
<CommandLine>powershell -command "Start-Service sshd"</CommandLine> <CommandLine>powershell -command "Start-Service sshd"</CommandLine>
</SynchronousCommand> </SynchronousCommand>
<SynchronousCommand wcm:action="add"> <SynchronousCommand wcm:action="add">
<Order>4</Order> <Order>4</Order>
<Description>autostart OpenSSH</Description>
<RequiresUserInput>false</RequiresUserInput>
<CommandLine>powershell -command "Set-Service -Name sshd -StartupType 'Automatic'"</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>5</Order>
<Description>OpenSSH PowerShell as default shell</Description> <Description>OpenSSH PowerShell as default shell</Description>
<RequiresUserInput>false</RequiresUserInput> <RequiresUserInput>false</RequiresUserInput>
<CommandLine>reg add "HKLM\Software\OpenSSH" /v DefaultShell /t REG_SZ /d "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" /f</CommandLine> <CommandLine>reg add "HKLM\Software\OpenSSH" /v DefaultShell /t REG_SZ /d "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" /f</CommandLine>

View file

@ -31,6 +31,8 @@ win_sshd_otherusepassword: "{{ win_obs_init__autologon_password }}"
win__special_rdp_user: "{{ voc_user }}" win__special_rdp_user: "{{ voc_user }}"
win__allow_special_rdp_user: true win__allow_special_rdp_user: true
# windows product key
windows_product_key: "{{ lookup('community.general.passwordstore', 'chvoc/ansible/windows/productkey') }}"
# define obs szene # define obs szene
win_obs_szene__project: 'wk23' win_obs_szene__project: 'wk23'

View file

@ -2,5 +2,5 @@
obs-white ansible_host=obs-white.local obs-white ansible_host=obs-white.local
obs-yellow ansible_host=10.10.0.211 obs-yellow ansible_host=10.10.0.211
# obs-yellow.local # obs-yellow.local
obs-blue ansible_host=obs-blue.local # obs-blue ansible_host=obs-blue.local
obs-misc ansible_host=obs-misc.local obs-misc ansible_host=obs-misc.local

@ -0,0 +1 @@
Subproject commit b53644731950306207f65f7e2b5780dbe72b2f9c

View file

@ -8,6 +8,7 @@
- name: Deploy windows users and basic config - name: Deploy windows users and basic config
hosts: obs hosts: obs
roles: roles:
- {role: tasks, tags: [task]}
- {role: win_warn_ansible_start, tags: [always, warn]} - {role: win_warn_ansible_start, tags: [always, warn]}
- {role: do1jlr.win_winerm, tags: winrm} - {role: do1jlr.win_winerm, tags: winrm}
- {role: do1jlr.win_base_setup, tags: [user, setup]} - {role: do1jlr.win_base_setup, tags: [user, setup]}