andrewrothstein / ansible-anaconda

Ansible role for installing Anaconda
MIT License
47 stars 42 forks source link

module (conda) is missing interpreter line #34

Closed chrishmorris closed 5 years ago

chrishmorris commented 5 years ago

Thank you for this great project. It successfully installed conda for me (on Centos7 in a vagrant box) but then failed with the following error message.

TASK [andrewrothstein.anaconda : remove conda-curl since it conflicts with the system curl] *** fatal: [default]: FAILED! => {"msg": "module (conda) is missing interpreter line"} to retry, use: --limit @/vagrant/playbook.retry

PLAY RECAP ***** default : ok=9 changed=5 unreachable=0 failed=1

Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again.

chrishmorris commented 5 years ago

Note that file /vagrant/roles/andrewrothstein.anaconda/subrepos/udst.ansible-conda/conda.py does correctly being with a shebang line:

lalmeras commented 5 years ago

Your should run your playbook with -vvv ; it may display the module_path used (display.vvv("Using module file %s" % module_path) in ansible source code).

chrishmorris commented 5 years ago

Thank you for your quick response. The problem turns out to be due to a weakness in the vboxsf file system, which did not allow a soft link with a path using "../". This is said to be fixed in the latest release of Virtualbox, which however is not compatible with Vagrant just now.

This is hardly a defect in ansible-anaconda so feel free to close. The workaround is to create the soft link with an absolute file path, in the host file system.

-------- details follow ------------------------------------------

Here is the error message with -vvv: TASK [andrewrothstein.anaconda : remove conda-curl since it conflicts with the system curl] **** task path: /vagrant/roles/andrewrothstein.anaconda/tasks/default.yml:51

ESTABLISH LOCAL CONNECTION FOR USER: vagrant EXEC /bin/sh -c 'echo ~vagrant && sleep 0' EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp/ansible-tmp-1545228448.54-133753309005576 `" && echo ansible-tmp-1545228448.54-133753309005576="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1545228448.54-133753309005576 `" ) && sleep 0' Using module file /vagrant/roles/andrewrothstein.anaconda/library/conda.py fatal: [localhost]: FAILED! => { "msg": "module (conda) is missing interpreter line" } to retry, use: --limit @/vagrant/playbook.retry The contents of that file are: ../subrepos/udst.ansible-conda/conda.py
lalmeras commented 5 years ago

Hi, not a project's developer here (just a project's follower), so I cannot close this issue myself. I let a project's developer closes the issue.

andrewrothstein commented 5 years ago

Before I started using Docker and Travis CI to unit test my roles, I would use vagrant plus VM(s) on my desktop. I never really bought into the Ansible vagrant provisioner. I basically configured vagrant, the VMs, and my desktop so that I could use Ansible from the host to manage the guest as I would any cloud instance. YMMV but have a look: https://github.com/andrewrothstein/vagrant-centos-7-cluster. I haven't touched it for some time so it might require a bit of love to get it functional again. Happy to collaborate on that if there's any interest. I've found it very useful for testing distributed systems that require a bunch of boxen to be configured together in cluster formation without having to pay a cloud provider.