As has been asked and answered before. Trying to install ansible or ansible-lint in windows 10 fails due to path too long. This has been closed with “we don’t support ansible running on windows – see to the doc”. Understood. However, the Ansible team needs to consider that many of us do NOT have a linux workstation to deveop on. (Actually not allowed in my company) Doing playbook development is dramatically better with the tools that support the task e.g. ansible-lint. I am not trying to run ansible under windows, only develop for it. Please consider creating a pip-installable that supports the development of custom modules, roles, and playbooks that does not install the core ansible.
This may be a dumb question, but can you develop on a remote system too? My company also doesn’t support Linux workstations/laptops, but I do all my Ansible development work on remote Linux hosts anyway.
The reason why this occurs is because 2.4 introduce some recursive symbolic links to the test folder that ultimately causes the path is too long error message on Windows. This was fixed [1] and will be part of the 2.4.4 and 2.5.0 release, when testing the 2.5.0rc3 pip install it succeeds on a Windows Server 2016 box.
We have also added some checks to the CI [2] to verify the filenames are valid on Windows to try and avoid some of these issues from appearing in the future but if you come across any more issue pleases raise a Github request.
In saying all this, while we do want to allow Ansible to be downloaded on a Windows host, this in no way means Ansible (as a controller) will work on Windows or any of the Python code will work properly. So you can install with pip and view the code, but when calling any of the code inside Ansible like ansible-lint does, it may still not work.
[1] https://github.com/ansible/ansible/pull/35073
[2] https://github.com/ansible/ansible/blob/devel/test/sanity/code-smell/no-illegal-filenames.py
Thanks
Jordan
Jordan, Thanks for the update. I certainly understand the perspective (I’ve been a Linux guy for many years). I may have to do my custom module development remotely. To answer Josh’s question (which wasn’t dumb), That is what I am currently doing (working via ssh on a text-only environment. However, my normal dev is done in PyCharm which is horribly slow when run from the Linux side. (Cross-country via vpn and x-windows running on Win10). So I am about 20% efficient in vi. LOL. I am the responsible party for getting my company to buy into the Ansible solution and since we are primarily a windows shop, I have to kick down as many of the potential push-back areas as possible.