Manage Windows with Ansible with Kerberos Active Directory authentication


In this technical overview, we will take a look at how to manage Windows with Ansible, including looking at setting up the prerequisites for installing Ansible for Windows management, as well as installing Ansible itself.

We will take a dive into configuring your Ansible environment for Kerberos authentication which allows setting up Ansible to authenticate with your Active Directory domain. This is extremely important in Active Directory environments.

You can clone down the shell script from my Github repository located here:

Also, the commands to run are:

sudo apt-get install gcc python-dev libkrb5-dev -y
sudo apt-get install python3-pip -y
sudo pip3 install –upgrade pip
sudo pip3 install –upgrade virtualenv
pip3 install pywinrm
sudo apt install krb5-user -y
sudo apt-get install python3-kerberos -y
sudo pip3 install ansible

By installing the above prerequisites and Ansible, you can easily manage your Windows servers in just a few steps.

Visit the official Ansible documentation located here:

Take a look at my detailed write-up on how to configure Ansible with Kerberos authentication here:

Configure Ansible Windows Server Kerberos authentication in Ubuntu

Also, check out to read more about Ansible and many other topics around cloud, virtualization, networking, automation, security, and much more.



Previous articleHow to harden Red Hat Enterprise Linux (RHEL) to the CIS benchmark using Ansible
Next articleInstall PowerShell Module to Windows Host with Ansible