When i try to run
ansible-galaxy install -r requirements.yml i get
ImportError: No module named pwd. the whole screen looks like this:
Traceback (most recent call last): File "c:/Python27/Scripts/ansible-galaxy", line 42, in <module> import ansible.constants as C File "c:\Python27\lib\site-packages\ansible\constants.py", line 19, in <module > import pwd ImportError: No module named pwd
i found these two closed issues on ansible on github:
both issues conclude that “Windows is not a supported operating system for an ansible control machine”.
I’m using Windows 7, Python 2.7.10, Ansible 1.9.2
Any help would be appreciated. Thnx.
I’m guessing this note from the trellis Windows wiki will be what you need:
If your host machine is running Windows, the workaround is to run Ansible on the VM (since it’s running Ubuntu) and not locally. You do not need to install Ansible manually.
When you run
vagrant up, the Vagrantfile will detect Windows and run the windows.sh script. The script installs Ansible and the external Ansible roles/packages on the VM (so you can also skip manually running the
ansible-galaxy install command).
Yep, basically this. Trellis doesn’t support nor has been tested using Cygwin. Trellis is set up to run Ansible in the VM, so if you need to run any Ansible commands, SSH in to the box and run then there.
filling kinda dumb for not checking out the wiki. i totally missed that part. anyway if i skip
ansible-galaxy install -r requirements.yml and just run
vagrant up everything works as expected.
thnx for the help.