Ansible 101 – Episode 14 – Ansible and Windows

    6
    20



    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: https://forms.gle/a9JUXhrmqNX3pEbK7

    Ansible for DevOps: https://www.ansiblefordevops.com

    Support Jeff on GitHub: https://github.com/sponsors/geerlingguy
    Support Jeff on Patreon: https://www.patreon.com/geerlingguy

    Contents:

    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

    source

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

    20 COMMENTS

    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 https://github.com/PowerShell/Powershell . 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"): https://orgpad.com/o/16854483-ee58-408d-80b4-b30fbd95c0dd
      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.