Can Ansible run on Windows?
There is the simple, uncomplicated answer in ansible.com:
No, Ansible can only manage Windows hosts. Ansible cannot run on a Windows host natively, though it can run under the Windows Subsystem for Linux (WSL).
My friend, now I going to show you how you can run Ansible without WSL. Go ahead!
First of all in order to run Ansible on Windows without WSL you have to install Cygwin.
Once you have installed Cygwin for Windows you should to install relevant Cygwin packages for Ansible.
Install from the Internet
This is the easiest way to install Cygwin packages.
Press
Next
Select
ansible
and required for you packages, then press twiceNext
:
-
Run installed
Cygwin64 Terminal
, and checkansible
version:
$ ansible --version ansible 2.8.4
-
Test whether
ansible
is working correctly:
$ ansible 127.0.0.1 -m shell -a 'echo Hello world!' 127.0.0.1 | CHANGED | rc=0 >> Hello world!
Congrats, my friend, you have installed Ansible
on Windows without WSL!
Install from the local directory (portable)
This installation option is useful for those who do not have Internet access.
First of all, you have to archive a folder where you have installed
cygwin
packages (in my case:c:\cygwin-packages\
)Copy
cygwin-setup-x86_64.exe
and the archive to a computer w/o Internet accessExtract archive to appropriate folders
Run
cygwin-setup-x86_64.exe
, and pressNext
Select a local package directory where you have extracted the archive with packages, and press
Next
:
Select
ansible
and required for you packages, then press twiceNext
:
Wait for installation succeed
-
Run installed
Cygwin64 Terminal
, and checkansible
version:
$ ansible --version ansible 2.8.4
-
Test whether
ansible
is working correctly:
$ ansible 127.0.0.1 -m shell -a 'echo Hello world!' 127.0.0.1 | CHANGED | rc=0 >> Hello world!
Congrats, my friend, you have installed Ansible
on Windows without WSL and Internet access on a computer!
Summary
In this post, we have seen:
- how to install Ansible on Windows w/o WSL using Internet access
- how to install Ansible on Windows w/o WSL and w/o Internet access
I hope this post was useful for you.
See you soon!
Top comments (0)