How to configure Ansible to connect to Windows hosts
We can automate the tasks on Windows hosts also using ansible. This article explains the steps configure Ansible to connect to Windows hosts.
Step1: Install Python module pywinrm.
#pip install pywinrm
Step2: Update the inventory file.
[windows-hosts]
IP
[windows-hosts:vars]
ansible_user=USER
ansible_password=PASS
ansible_connection=winrm
ansible_winrm_server_cert_validation=ignore
Here IP, USER, PASS need to be replaced with the ipaddress, username and password of windows host.
That's all…