In this second blog post in the manage Windows machines with Ansible, I will show you how to install WinRM on an Ansible control host.
In the series
- Manage Windows Machines With Ansible – Basics and Active Directory Service Account – Part 1
- Manage Windows Machines With Ansible – Install WinRM – Part 2
- Manage Windows Machines With Ansible – Install and Configure Ansible – Part 3
If you remember, in part one, we created the Ansible service account and added it to the Domain Admins group using PowerShell.
Now it is time, to start configuring our Ubuntu host and install WinRM which is the management layer Ansible will communicate with on the Windows hosts.
To get WinRM installed on our control host, we will install Python PIP first and after the WinRM tools.
To install WinRM, let’s login to our Ansible hosts and run the following commands.
apt update apt install gcc python-dev apt install python3-pip apt install python3-winrm pip3 install "pywinrm>=0.3.0"
In the next blog post, we install and configure Kerberos which will handle the authentication layer between Ansible and Active Directory.