Ansible preparation

As already mentioned, Ansible will be using WinRM to interact with our Windows host.

WinRM provides access to a SOAP-like protocol called WS-Management. Unlike SSH, which provides the user with an interactive shell to manage the host, WinRM accepts scripts that are executed and then the results are passed back to you.

To be able to use WinRM, Ansible requires us to install a few different Python modules, Linux users can use the following command to install them:

$ sudo pip install pywinrm[credssp]

macOS users may need to perform the following command if they get errors about pyOpenSSL that can't be updated, as it is part of the core operating system:

$ sudo pip install pywinrm[credssp] --ignore-installed pyOpenSSL

Once ...

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.