Ansible 101 – Episode 14 – Ansible and Windows


    Jeff Geerling (geerlingguy) discusses Ansible and Windows; how to use Ansible on Windows and how Ansible can be used to manage Windows environments.

    Submit questions for the final Q&A episode here:

    Ansible for DevOps:

    Support Jeff on GitHub:
    Support Jeff on Patreon:


    00:00 – Start
    00:20 – Intro
    03:38 – Jeff’s Windows Background
    06:32 – Windows Update
    07:30 – Install WSL2 and Ansible
    17:13 – Vagrant and Ansible with WSL2
    32:45 – Manage Windows with Ansible
    33:54 – Set up OpenSSH on Windows
    40:38 – Talking to myself
    41:01 – Ansible Windows Modules
    45:47 – Ansible Windows Collection
    49:54 – Ansible 101 series discussion
    52:23 – Call for questions for final episode
    56:24 – Outtro


    Previous articleChange local user password on Windows-like systems – Ansible module win_user
    Next articleDocker container communication | Springboot microservice communication using docker network


    1. I got out of Windows administration back with Server 2003. I've done Windows administration since then, but begrudgingly. I'd love to hear if there are reasons to use WinRM over OpenSSH at this point. I've set up WinRM a couple of times. It looks like there are 4 different options for securing the connection, and at least one of them is laughably terrible. But the rest seem like a pain to set up.

    2. I suppose this goes for all your videos- but since you brought up Vagrant installing an old version if you do a direct apt-get, if I simply put in a different repo into the repositories file, can I do it that way? Or does it HAVE to be manual to get the most recent version?

    3. I know I'm running way late, but I'm wondering what version of PowerShell you're running? If it's just what was already installed with Windows, You might want to try PowerShell Core . I'm not sure if it would make a difference and I've not tried the examples you gave, but I've really liked PowerShell Core over "Desktop" and it's fixed some other issues I've had with the pre-installed version of PowerShell.

    4. It is possible to install vagrant virtualbox and openssh using Chocolatey. (Install Chocolatey and run 'choco install virtualbox vagrant'). Actually with the current version of Windows 10 and Windows Server 2019 the OpenSSH can be activated more easily using basically two short PowerShell lines. I have made some documentation for SSH on Windows in general (look on the right, click to open the bubbles with a shadow, scroll to zoom in or out "Get SSH" > Windows > "OpenSSH CLI"):
      The documentation @Jeff Geerling is using for setting up SSH is aimed more at developers than actual users and is probably harder than it needs to be.
      Btw. I am using Ansible to manage Windows, but since at work we use Active Directory, I use WinRM and authenticate using Kerberos. That works rather well. Only when something goes wrong, the error messages are not really helpful.