<aside> ⛔ Ansible is pre installed on the Ubuntu VM. You can skip this part if you are using the premade VM

</aside>

Ansible Official Installation Documentation

Installing Ansible - Ansible Documentation

Windows

  1. Open the Start menu and search for Turn Windows features on or off. Click on the shortcut when it appears.

https://phoenixnap.com/kb/wp-content/uploads/2021/04/how-to-install-and-configure-ansible-on-windows-31.png

  1. Scroll down through the list of features until you see Windows Subsystem for Linux & Virtual machine Platform. Click on the checkbox for both, and then click OK to enable the feature.

Untitled

  1. If you would like to use Windows Subsystem for Linux 2. Download the update from the following link and install the Subsystem.

Untitled

  1. After the install is completed run the following command in powershell
wsl --set-default-version 2
  1. Open the Microsoft Store. Search for Ubuntu and click on Get to install the latest version.

https://phoenixnap.com/kb/wp-content/uploads/2021/04/how-to-install-and-configure-ansible-on-windows-34.png

  1. Once the installation is complete, click on Launch to start up the Ubuntu command terminal.

    Untitled

  2. You should have a Ubuntu shell with your newly created user.

    Untitled

  3. To install Ansible, enter the following set of commands:

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

Linux

Installing Ansible on Ubuntu

Ubuntu builds are available in a PPA here.

To configure the PPA on your machine and install Ansible run these commands:

MacOS

Install Homebrew

/bin/bash -c "$(curl -fsSL [<https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>](<https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh>))"

Install Ansible

brew install ansible