A beginners guide to Ansible
This guide is a work in progress, and will be written more to in the future.
Table of Contents
Installation of Ansible
Windows
To get started with Ansible on Windows start by following my guide on installing WSL2 on Windows since, there’s no official support to running Ansible from a Windows machine. Installation of WSL2
Afterwards you can follow the Linux steps below.
Linux
Ansible should be builtin to your favourite and default package manager. We need to install sshpass to be able to connect to the machines using SSH.
Ubuntu
sudo apt install update
sudo apt install ansible sshpass
sudo apt -y install python3-paramiko
macOS
First we have to install homebrew on our machine, this can be done faily quickly by doing the following. Brew is a package manager for macOS, much like the onces you can find builtin to Linux.
xcode-select --install
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
To install ansible type the following command.
brew install ansible
To install paramiko, which is necessary to run Ansible.
pip3 install paramiko
Brew dosen’t find sshpass secure so we have to install and add a repository for that manually.
brew tap esolitos/ipa
brew install esolitos/ipa/sshpass