Run Ansible from any Operating System even Windows

Step 1:

Install Docker

Step2:

Alias all Ansible commands by wrapping them with docker container

alias ansible='docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock   -v $(pwd):/code -w /code -e ANSIBLE_CONFIG=/code/ansible.cfg  abdennour/ansible:2.8.5 ansible'

Step3 :

Go to your playbook where the file ansible.cfg exist, and run ansible like a boss :

cd /path/to/directory/have/ansible-cfg-file/

Written by

Software engineer, Cloud Architect, 5/5 AWS|GCP|PSM Certified, Owner of kubernetes.tn

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store