How to install Ansible with Windows 10 (Operating System)

Hello Community,

I m very new to Ansible environment. I have decided to develop a networking project with Ansible. Because Ansible is simplast and is much cleaner because it automates the process of getting context before running Tasks.

Community can anyone guide me how to install Ansible on my laptop having OS Windows 10.

If there is any easy reference present on web for the same, then please notify me.

Thanks in advance.

Thanking you.

Regards,
Satish.

You can not currently install Ansible natively on Windows.

I would recommend utilizing Vagrant, an open source utility that allows you to very easily manage virtual machines (known as Boxes). You can create a use one of the community provided Linux boxes and install Ansible on that. I would also check out syncing a local folder with the Vagrant box so you can develop your playbooks using native Windows tool you may be more familar with and then just execute the Ansible playbooks on the box.

Come check out the Ansible Reddit Community if you have any questions as well.

You can sort of run ansible on windows but there are a few things you should be aware of before trying.

1 you need to have a 64 bit windows 10 installation
2 you need to be running the anniversary update version build 1607 or later
3 you need to enable Developer Mode.
4 you have to enable ‘Windows Subsystem for Linux (Beta)’, which as the name implies is beta quality, by running optionalfeatures.exe and selecting it
5 its not supported yet, so should be considered experimental.

If you are happy with all of the above you can open a cmd window and type ‘bash’

This will then download a lot of stuff from windows store and you’ll have to reboot again I think.

Eventually you will get a bash prompt which looks like you are running a terminal window on unbuntu 14.04.

Once you have got this far you can install ansible by doing an apt-get update and then install ansible from pip. Expect a few failures getting all the libraries installed to start with - I had to install dev versions of several things including python, openssl and cffi but that might have been because I wanted cryptography and pywinrm installed as well.

I have been using this a bit to create/modify playbooks, but I wouldn’t use it in production yet.

Depending on your experience level it might well be better to use a virtual machine as it is a slightly odd experience using ‘Bash on Windows’. If you run a ps -ef for example you only see your own user processes - there’s no cron or anything like that happening, just processes for your current user.
Also each time you change your networking configuration (such as by connecting to, or disconnecting from a vpn) it will re-write your /etc/resolv.conf file, which may or may not mess up your DNS resolution.

Jon

HEllo Jon,

Very good morning.

Thank you for your reply.

So as per your suggestion, Windows10 is not suitable for Ansible’s development.

Is it ok, if am shifted to Windows10 to Ubantu for Ansible’s development.

Please let me know.

Thanking you.

Regards,
Satish.

Hello Drew,

Good morning.

Thank you for your reply.

Is it ok, if am shifted to Windows10 to Ubantu for Ansible’s development.

Please let me know.

Thanking you.

Regards,
Satish.

Satish

Its up to you.

Bash on Windows is still pretty new so if you come across problems maybe not so many people will have found solutions.

Personally I’m happy to use it for modifying my playbooks as I create them, but I would not yet trust it for my production environments, and as far as I’m aware its not considered a supported configuration for ansible - as documented here: http://docs.ansible.com/ansible/intro_windows.html#reminder-you-must-have-a-linux-control-machine

Jon

I have tested this and initially when i started it was looking like it is very good to have this on windows but later i realize it have lot of issue. so i would not recommend until you are not fully ready to get new challenge and have time to fix those.

Regards/Surjeet

Works well inside winbuntu just from apt if that works for you.