Ansible

Running Ansible on Windows

Technically, Ansible cannot run on a Windows. However, it may manage Windows hosts.

As a workaround Ansible can be run under the Windows Subsystem for Linux (WSL).

Let me elaborate three ways to make this happen (I will cover one for now, however, will leave the other 2 for future):

  1. Microsoft store’s Ubuntu App
  2. Linux Virtual Machine on Windows Host
  3. Cygwin

1st Approach: Microsoft store’s Ubuntu App

1. Click Start and search for Turn Windows features on or off. Click on the app icon.

2. In the list of features search Windows Subsystem for Linux. Click on the checkbox, and then click OK to enable the feature.

3. Open the Microsoft Store. Search for Ubuntu and click on Get to install the latest version.

4. After the installation is done, click on Launch to start up the Ubuntu command terminal.

5. Install Ansible, using the following set of commands:

$ sudo apt-get update
$ sudo apt-get install software-properties-common
$ sudo apt-add-repository ppa:ansible/ansible
$ sudo apt-get update
$ sudo apt-get install ansible -y

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.