Run Ansible from any Operating System even Windows

Step 1:

Step2:

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'alias ansible-playbook='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-playbook'alias ansible-inventory='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-inventory'alias ansible-galaxy='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-galaxy'alias ansible-doc='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-doc'

Step3 :

cd /path/to/directory/have/ansible-cfg-file/ansible --versionansible --list-hosts allansible-inventory --graphansible all -m pingansible-playbook .....

--

--

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