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:
https://github.com/brandonleegit/ansibleinstall
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:
https://docs.ansible.com/
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 Virtualizationhowto.com to read more about Ansible and many other topics around cloud, virtualization, networking, automation, security, and much more.
Question please: does the domain account absolutely need to be have been added to an administrator group on the windows vm already? before being able to authenticate with that user?
how to find default realm?
Thanks for posting looking at doing a POC at work.
Appreciate the knowledge and step by step explanations. Once again Thank you!
Hi, thanks for the video it helps me a lot !