# Ansible and 'Ubuntu on Windows'

**URL:** <https://forum.ansible.com/t/ansible-and-ubuntu-on-windows/21117>\
**Category:** Ansible Project\
**Tags:** windows, ubuntu\
**Created:** [April 9, 2016, 8:16pm UTC](https://forum.ansible.com/t/ansible-and-ubuntu-on-windows/21117 "2016-04-09T20:16:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [April 9, 2016, 8:16pm UTC](https://forum.ansible.com/t/ansible-and-ubuntu-on-windows/21117/1 "2016-04-09T20:16:42Z")

</div>

Hello,

Microsoft announced Ubuntu on Windows recently - there’s a bit of information about it here:

[https://insights.ubuntu.com/2016/03/30/ubuntu-on-windows-the-ubuntu-userspace-for-windows-developers/](https://insights.ubuntu.com/2016/03/30/ubuntu-on-windows-the-ubuntu-userspace-for-windows-developers/)

Obviously this opens up intriguing possibility of running Ansible on a windows machine (without a port, which I understand would be an enormous piece of work.

The preview it seems, isn’t quite capable of running Ansible, though. There’s a bug report here [https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13333764-python-bugs](https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13333764-python-bugs)

If you happen to be interested in this, please vote on the bug report.

Many thanks,

Jon

---

<div class="post-metadata">

**Author:** ![Edgars](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@Edgars](https://forum.ansible.com/u/Edgars)\
**Post date:** [April 11, 2016, 8:21am UTC](https://forum.ansible.com/t/ansible-and-ubuntu-on-windows/21117/2 "2016-04-11T08:21:41Z")

</div>

I run Ansible on Cygwin and never had any problems with it.

Edgars

sestdiena, 2016. gada 9. aprīlis 22:16:42 UTC+2, J Hawkesworth rakstīja:

---

<div class="post-metadata">

**Author:** ![Edgars](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@Edgars](https://forum.ansible.com/u/Edgars)\
**Post date:** [April 11, 2016, 7:12pm UTC](https://forum.ansible.com/t/ansible-and-ubuntu-on-windows/21117/3 "2016-04-11T19:12:17Z")

</div>

I just installed Ansible on Windows 10/Ubuntu. Ansible works just fine if I install it with apt-get (that is version 1.5.4). When I installed ansible with pip, I hit the mentioned bug,

Edgars

sestdiena, 2016. gada 9. aprīlis 22:16:42 UTC+2, J Hawkesworth rakstīja:

---

<div class="post-metadata">

**Author:** ![Edgars](https://avatars.discourse-cdn.com/v4/letter/e/f17d59/32.png) [@Edgars](https://forum.ansible.com/u/Edgars)\
**Post date:** [April 11, 2016, 7:16pm UTC](https://forum.ansible.com/t/ansible-and-ubuntu-on-windows/21117/4 "2016-04-11T19:16:31Z")

</div>

[![](https://lh3.googleusercontent.com/-R_ZC6hMJtxI/Vwv39JojfbI/AAAAAAAAAB0/lt6SZbWxFcIesmVDcyuGkDNmmqQtKS_Tg/s320/Capture.JPG)](https://lh3.googleusercontent.com/-R_ZC6hMJtxI/Vwv39JojfbI/AAAAAAAAAB0/lt6SZbWxFcIesmVDcyuGkDNmmqQtKS_Tg/s1600/Capture.JPG)

pirmdiena, 2016. gada 11. aprīlis 21:12:17 UTC+2, Edgars rakstīja:

---

<div class="post-metadata">

**Author:** ![pixel\_fairy](https://avatars.discourse-cdn.com/v4/letter/p/6f9a4e/32.png) [@pixel\_fairy](https://forum.ansible.com/u/pixel_fairy)\
**Post date:** [April 12, 2016, 3:46am UTC](https://forum.ansible.com/t/ansible-and-ubuntu-on-windows/21117/5 "2016-04-12T03:46:38Z")

</div>

have you tried with the ppa?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [June 24, 2016, 4:55pm UTC](https://forum.ansible.com/t/ansible-and-ubuntu-on-windows/21117/6 "2016-06-24T16:55:11Z")

</div>

Its been a while and so there have probably been further updates to the Insider builds currently needed to run this, but I just tried this and managed to get ansible 2.1.0 installed via pip and able to win\_ping a couple of windows boxes on my network.

To get to 2.1.0 I did the following

sudo pip install ansible

(got me 1.5.4)

sudo pip install ansible --upgrade

This failed first time as it couldn’t find python.h so I guessed I needed the python development package which I got via

sudo apt-get install python-dev

then I re-ran

sudo pip install ansible --upgrade

said ok but ansible didn’t run, so I ran

sudo pip uninstall ansible

and

sudo pip install ansible --upgrade

That got me a version of 2.1.0 than I could run

ansible localhost -m ping

successfully.

Then I ran

sudo pip install pywinrm

set up my inventory and group\_vars and then I was able to

ansible windows -m win\_ping

to talk to my windows hosts.

If you are thinking of trying this right now you need to

sign up for insider program (requires a microsoft login of some description)  
be running 64 bit windows 10 (not sure if Enterprise edition is required, but that’s what I wound up using).  
in advanced windows update settings, enable insider builds and slide the slider to ‘Fast’  
wait for and grind through a lot of windows updates (for some reason I had to wait a couple of days to get the right update versions).  
Go into windows features and enable Windows Subsystem for Linux (Beta)  
Go through another reboot  
start a dos box and type bash  
wait while lots of stuff downloads

Hopefully not long till this gets into a released windows 10 build.

Jon
