Overview

If you want to install Ansible on windows, you will encounter the fact that Ansible doesn't run on windows. At least not natively. There are 2 ways how to operate with ansible on Windows:

Using Cygwin

Installing ubuntu Subsystem (only Windows 10+)

We will do it both ways here, but before we continue it is important to mention that ansible is disered state / agentless / automation system. In order for it to communicate with the targets it relies on:

WinRm - For Windows Systems

SSH - For Linux Systems

So let's continue all :)

Cygwin

Downloading and installing Cygwin is fairly easy. Just download the Cygwin and select ansible in the package:

After that you will have the ansible command

Cygwin intro

Ubuntu SubSystem

The ubuntu subsystem is available from the windows store and can be installed on Windows 10+ After you install the ubuntu WS, we have to install couple other stuff before ansible :) So let's get going. Firstly, we have to update our repo:

Update Repo

Then we have to install the pip:

Installing Pip

Really finally, we can install the ansible using the pything indexing or the Pip

Install ansible

Communicate with Windows

To communicate with windows we have to install couple other modules:

Pywinrm - Used for communication with Windows

Pywinram[credssp] - Used for authentication

Install pywinrm

Install Collections

From Ansible 2.10 or so, you have to install collections in Ansible, if you want to use them:

Install Oracle OCI

To install Oracle collection: (oracle.oci) just run the following commands:

Install oracle.oci