Compare commits
2 commits
a68c0e553d
...
be56d043e5
Author | SHA1 | Date | |
---|---|---|---|
be56d043e5 | |||
f86a0d38be |
2 changed files with 44 additions and 1 deletions
34
README.md
34
README.md
|
@ -33,5 +33,37 @@ Get-Host | Select-Object Version
|
||||||
#### Windows Version
|
#### Windows Version
|
||||||
```ps1
|
```ps1
|
||||||
# In your Powershell
|
# 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
|
||||||
|
```
|
||||||
|
|
||||||
|
### 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
|
||||||
|
```
|
||||||
|
|
||||||
|
Ansible deploy host requirements
|
||||||
|
----------------------------------
|
||||||
|
```bash
|
||||||
|
pip install pywinrm
|
||||||
|
```
|
||||||
|
|
||||||
|
|
11
ansible.cfg
Normal file
11
ansible.cfg
Normal file
|
@ -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
|
Loading…
Reference in a new issue