update Readme for gopass use

This commit is contained in:
L3D 2022-12-29 00:41:49 +01:00
parent 4f99d7a9a6
commit aa7431f729
Signed by: l3d
GPG key ID: CD08445BFF4313D1
3 changed files with 21 additions and 20 deletions

View file

@ -41,8 +41,14 @@ Get-Host | Select-Object Version
Set up Ansible Set up Ansible
---------------- ----------------
Ansible Requirements
```bash ```bash
ansible-galaxy install -r requirements.yml ansible-galaxy install -r requirements.yml
```
And PyWinRM Python mdule
```bash
pip3 install pywinrm
``` ```
Configure Ansible Access (WinRM Setup) Configure Ansible Access (WinRM Setup)
@ -51,9 +57,10 @@ ansible-galaxy install -r requirements.yml
### configure WinRM Access ### configure WinRM Access
Configure WinRM with the ``ConfigureRemotingForAnsible.ps1`` Script as described in [docs.ansible.com/ansible/latest/user_guide/windows_setup.html#winrm-setup](https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html#winrm-setup) in your WINDOWS PowerShell. Configure WinRM with the ``ConfigureRemotingForAnsible.ps1`` Script as described in [docs.ansible.com/ansible/latest/user_guide/windows_setup.html#winrm-setup](https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html#winrm-setup) in your WINDOWS PowerShell.
### configure ansible setup ### configure ansible setup for new hosts
+ add your host to the ``hosts.ini`` file. + add your host to the ``hosts.ini`` file.
+ add the following variables in the ``host_vars``: + add the following variables in the ``host_vars``:
```yaml ```yaml
--- ---
# host_vars/$hostname/vars.yml # host_vars/$hostname/vars.yml
@ -63,6 +70,11 @@ ansible_password: 'Your_Windows_Admin_Password'
ansible_winrm_server_cert_validation: ignore ansible_winrm_server_cert_validation: ignore
``` ```
Gopass Passwords
------------------
- Make sure you have [gopass](https://gopass.pw) installed
- Checkout the gopass repo and mount in to ``chvoc``.
### validate access ### 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 After you installed the required deploy host python packages you can verify that the access is working by running the following ad-hoc command
@ -70,16 +82,6 @@ After you installed the required deploy host python packages you can verify that
ansible -m win_ping all ansible -m win_ping all
``` ```
Ansible deploy host requirements
----------------------------------
```bash
pip install pywinrm
```
Name convention
-----------------
Use ``obs-$name`` with any name of [My little Pony villans](https://villains.fandom.com/wiki/Category:My_Little_Pony_Villains).
Ad-hoc copy file example: Ad-hoc copy file example:
---------------------------- ----------------------------
```bash ```bash

View file

@ -1,4 +1,12 @@
--- ---
# user for ansible login
ansible_user: ansible
# language options (important)
win_base_init__os_language: 'en'
win_obs_init__powerplan_enabled: true
win_obs_init_powerplan_mode: 'high performance'
# connect # connect
ansible_connection: winrm ansible_connection: winrm
ansible_winrm_server_cert_validation: ignore ansible_winrm_server_cert_validation: ignore

View file

@ -1,9 +0,0 @@
---
# user for ansible login
ansible_user: ansible
# OS language
win_base_init__os_language: 'de'
win_obs_init__powerplan_enabled: true
win_obs_init_powerplan_mode: 'Ultimative Leistung'