79 lines
2.7 KiB
Markdown
79 lines
2.7 KiB
Markdown
Ansible Playbook WINDOWS OBS Setup
|
|
=====================================
|
|
|
|
Ansible Playbook to Setup a Windows 10 Enterprise Host to Stream with OBS.
|
|
|
|
**WINTERCONGRESS 2023 Edition** -> *This version of the ansible playbook is designed deploy the winkekatze.tv setup for Winterkongress 2023!*
|
|
|
|
Requirements
|
|
---------------
|
|
Your Windows 10 Host has the following Software Requirements bevore starting ansible usage *(based on [windows_setup.html#host-requirements](https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html#host-requirements)*:
|
|
+ PowerShell version 3.0 or newer
|
|
+ .NET Framework 4.0 or newer
|
|
|
|
This Playbook is only tested at Windows 10 Enterprise
|
|
|
|
### How to get the Version Numbers
|
|
|
|
#### Powershell
|
|
```ps1
|
|
# In your Powershell
|
|
Get-Host | Select-Object Version
|
|
```
|
|
|
|
#### .NET Framework
|
|
```ps1
|
|
# In your Powershell
|
|
(Get-ItemProperty "HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full").Version
|
|
```
|
|
|
|
#### Windows Version
|
|
```ps1
|
|
# In your Powershell
|
|
(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName
|
|
```
|
|
|
|
Set up this git Repository
|
|
----------------------------
|
|
+ Clone this git repo
|
|
+ Check out all [Submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) e.G. with ``git submodule update --init --recursive``
|
|
+ Configure git to always update submodules on pull: ``git config submodule.recurse true``
|
|
|
|
Set up Ansible
|
|
----------------
|
|
Ansible Requirements
|
|
```bash
|
|
ansible-galaxy install -r requirements.yml
|
|
```
|
|
|
|
Install sshpass fo SSH with Passwords to windowsvia ansible
|
|
```bash
|
|
sudo apt install sshpass
|
|
```
|
|
|
|
Configure Ansible Access (Windows SSH Server Setup)
|
|
----------------------------------------
|
|
|
|
Have a look at the [official Ansible Docs](https://docs.ansible.com/ansible/latest/os_guide/windows_setup.html#windows-ssh-setup) and install [OpenSSH Server](https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse?tabs=powershell) on Windows or WinRM by running the [ConfigureRemotingForAnsible.ps1](https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1) script.
|
|
|
|
Gopass Passwords
|
|
------------------
|
|
- Make sure you have [gopass](https://gopass.pw) installed
|
|
- Checkout the gopass repo and mount in to ``chvoc``.
|
|
|
|
### validate access
|
|
After you installed the required deploy host python packages you can verify that the access is working by running the following ad-hoc command
|
|
|
|
```bash
|
|
ansible -m win_ping all
|
|
```
|
|
|
|
Ad-hoc copy file example:
|
|
----------------------------
|
|
```bash
|
|
# create C:\media\
|
|
ansible -m ansible.windows.win_file -a "path='C:\media' state=directory" all
|
|
|
|
# copy file
|
|
ansible -m ansible.windows.win_copy -a "src=/tmp/copy.txt dest='C:\media\copy.txt'" all
|
|
```
|