From e3ebd90f625a02b9fac981913e01ae4bd911f890 Mon Sep 17 00:00:00 2001 From: L3D Date: Sun, 17 Sep 2023 22:16:12 +0200 Subject: [PATCH] Cleanup and prepare for next event --- .gitmodules | 3 ++ LICENSE | 2 +- README.md | 19 ++++++++---- ansible.cfg | 2 +- collections/ansible_collections/chocolatey | 1 + group_vars/obs/vars.yml | 2 +- hosts.ini | 2 +- requirements.yml | 29 +++++++++---------- roles/do1jlr.win_obs_setup | 2 +- roles/do1jlr.win_sshd | 2 +- .../autounattend.xml | 0 11 files changed, 37 insertions(+), 27 deletions(-) create mode 160000 collections/ansible_collections/chocolatey rename autounattend.xml => win10_setup/autounattend.xml (100%) diff --git a/.gitmodules b/.gitmodules index 93d40a7..1dace8f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -58,3 +58,6 @@ [submodule "collections/ansible_collections/community/windows"] path = collections/ansible_collections/community/windows url = https://github.com/ansible-collections/community.windows.git +[submodule "collections/ansible_collections/chocolatey"] + path = collections/ansible_collections/chocolatey + url = https://github.com/chocolatey/chocolatey-ansible.git diff --git a/LICENSE b/LICENSE index 9c979b4..b8b8656 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 L3D +Copyright (c) 2021-2023 L3D Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0de2c51..271d585 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ 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!* +**SWISS PYTHON SUMMIT 2023 Edition** -> *This version of the ansible playbook is designed deploy the winkekatze.tv setup for Swiss Python Summit 2023!* Requirements --------------- @@ -41,12 +41,14 @@ Get-Host | Select-Object Version Set up Ansible ---------------- -Ansible Requirements +Make Sure you have the latest version of ansible installed. And all git submodules are checked out and at the latest version. ```bash -ansible-galaxy install -r requirements.yml +python3 -m venv ansible +source ansible/bin/activate +pip install ansible ``` -Install sshpass fo SSH with Passwords to windowsvia ansible +Install sshpass fo SSH with Passwords to windows via ansible ```bash sudo apt install sshpass ``` @@ -65,12 +67,12 @@ Have a look at the [official Ansible Docs](https://docs.ansible.com/ansible/late 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 +ansible -m ansible.builtin.win_ping all ``` Windows Installation ---------------------- -There is a prepared [autounattend.xml](autounattend.xml) to automate the windows installation, that will create an ``setup`` User. +There is a prepared [autounattend.xml](win10_setup/autounattend.xml) to automate the windows installation, that will create an ``setup`` User. Ad-hoc copy file example: ---------------------------- @@ -81,3 +83,8 @@ 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 ``` + + Questions +----------- + +Feel free to aks. For example by writing a message to ``video winkekatze.tv``. diff --git a/ansible.cfg b/ansible.cfg index ce49564..63ae7c7 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -9,7 +9,7 @@ forks = 20 gathering = smart fact_caching = jsonfile fact_caching_connection = $HOME/.ansible/facts -host_key_checking = false +host_key_checking = 'accept-new' [passwordstore_lookup] backend = gopass diff --git a/collections/ansible_collections/chocolatey b/collections/ansible_collections/chocolatey new file mode 160000 index 0000000..9bdc0d4 --- /dev/null +++ b/collections/ansible_collections/chocolatey @@ -0,0 +1 @@ +Subproject commit 9bdc0d40437a7dc7f0181af42da7e35bbcfcae4a diff --git a/group_vars/obs/vars.yml b/group_vars/obs/vars.yml index 4d96651..7ca41a6 100644 --- a/group_vars/obs/vars.yml +++ b/group_vars/obs/vars.yml @@ -35,7 +35,7 @@ win__allow_special_rdp_user: true windows_product_key: "{{ lookup('community.general.passwordstore', 'chvoc/ansible/windows/productkey') }}" # define obs szene -win_obs_szene__project: 'wk23' +win_obs_szene__project: 'sps23' # TODO: Artwork einfuegen, wenn verfuegbar! win_obs_additional_dirs: ['obs-config'] wallpaper_path: 'C:\obs\{{ win_obs_szene__project }}\background_logo_big.png' diff --git a/hosts.ini b/hosts.ini index 75789ff..3b36be9 100644 --- a/hosts.ini +++ b/hosts.ini @@ -1,2 +1,2 @@ [obs] -obs-aula ansible_host=obs-aula.local +obs-aula ansible_host="obs-aula.local" diff --git a/requirements.yml b/requirements.yml index 8b4ceb8..5816084 100644 --- a/requirements.yml +++ b/requirements.yml @@ -1,19 +1,18 @@ --- roles: [] -collections: - # Install a collection from Ansible Galaxy. - - name: community.general - version: '>=6.1.0,<7.0.0' - source: https://galaxy.ansible.com - - name: chocolatey.chocolatey - version: '>=1.4.0,<2.0.0' - source: https://galaxy.ansible.com - - name: ansible.windows - version: '>=1.13.0,<2.0.0' - source: https://galaxy.ansible.com - - name: community.windows - version: '>=1.12.0,<2.0.0' - source: https://galaxy.ansible.com - +collections: [] + # Install a collection from Ansible Galaxy. +# - name: community.general +# version: '>=6.1.0,<7.0.0' +# source: https://galaxy.ansible.com +# - name: chocolatey.chocolatey +# version: '>=1.4.0,<2.0.0' +# source: https://galaxy.ansible.com +# - name: ansible.windows +# version: '>=1.13.0,<2.0.0' +# source: https://galaxy.ansible.com +# - name: community.windows +# version: '>=1.12.0,<2.0.0' +# source: https://galaxy.ansible.com diff --git a/roles/do1jlr.win_obs_setup b/roles/do1jlr.win_obs_setup index ddf576f..077b55f 160000 --- a/roles/do1jlr.win_obs_setup +++ b/roles/do1jlr.win_obs_setup @@ -1 +1 @@ -Subproject commit ddf576f3c3f7c1e1a30d2b3341a453f21d0000f5 +Subproject commit 077b55f2d036c89cf57fa277fc6bc6227ee4940f diff --git a/roles/do1jlr.win_sshd b/roles/do1jlr.win_sshd index 81c39ab..ca2bd9c 160000 --- a/roles/do1jlr.win_sshd +++ b/roles/do1jlr.win_sshd @@ -1 +1 @@ -Subproject commit 81c39ab5a7177e36cb3b6deeccf7d10a0e1d84bc +Subproject commit ca2bd9cbc7026d8a25c67beb6805f1693b14c0e4 diff --git a/autounattend.xml b/win10_setup/autounattend.xml similarity index 100% rename from autounattend.xml rename to win10_setup/autounattend.xml