From f86a0d38bedccea837178be079c8b3c6e3e73cbb Mon Sep 17 00:00:00 2001 From: L3D Date: Mon, 13 Dec 2021 23:10:38 +0100 Subject: [PATCH] start describing first setup --- README.md | 27 ++++++++++++++++++++++++++- ansible.cfg | 11 +++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 ansible.cfg diff --git a/README.md b/README.md index 5ea1f41..7b066e7 100644 --- a/README.md +++ b/README.md @@ -33,5 +33,30 @@ Get-Host | Select-Object Version #### Windows Version ```ps1 # In your Powershell -(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ReleaseId +(Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion").ProductName ``` + + Configure Ansible Access (WinRM Setup) +---------------------------------------- + +### 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 ansible setup ++ add your host to the ``hosts.ini`` file. ++ add the following variables in the ``host_vars``: +```yaml +--- +# host_vars/$hostname/vars.yml +ansible_connection: winrm +ansible_user: 'Windows_Admin_User' +ansible_password: 'Your_Windows_Admin_Password' +ansible_winrm_server_cert_validation: ignore +``` + + Ansible deploy host requirements +---------------------------------- +```bash +pip install pywinrm +``` + diff --git a/ansible.cfg b/ansible.cfg new file mode 100644 index 0000000..88a59d7 --- /dev/null +++ b/ansible.cfg @@ -0,0 +1,11 @@ +[defaults] +inventory = ./hosts.ini +retry_files_enabled = false +nocows = true + +log_path = $HOME/.ansible/ansible.log + +forks = 20 +gathering = smart +fact_caching = jsonfile +fact_caching_connection = $HOME/.ansible/facts