My issue is pretty similar to this thread as my local dev / vagrant up works fine but trying to set up the remote server (Ubuntu 18.04. on a DO droplet) renders the following error:
TASK [Gathering Facts] ****************************************************************************************************************************
System info:
Ansible 2.7.10; Darwin
Trellis 1.0.2: March 13th, 2019
---------------------------------------------------
The module failed to execute correctly, you probably need to set the
interpreter.
See stdout/stderr for the exact error
/bin/sh: 1: /usr/bin/python: not found
fatal: [165.22.75.75]: FAILED! => {"changed": false, "module_stdout": "", "rc": 127}
The trellis release is almost up to date (1.0.2 vs 1.0.3) and the latest changes don’t touch on the subject so I am clueless as to what I can do here…?
If I install python manually on the remote system it will work but that creates another set of issues.
Found this article which touches on the subject – they offer a way to set the ansible_python_interpreter and some other options but I wouldn’t be sure / skilled enough to implement this and offer a PR…
I followed this AskUbuntu post and enabled all the other package sources in /etc/apt/sources.list that have previously been uncommented and now it works…
The question would be then: Why is this happening (to me?) and how could I prevent this from happening again in the future?
python3 is installed (Python 3.6.7) on the remote server.
Symbolic link one of them as /usr/bin/python
I thought trellis would take care of that…?
If I don’t symlink python and instead just uncomment the line deb http://archive.canonical.com/ubuntu bionic partner
in /etc/apt/sources.list then trellis installs the missing packages fine…
So I guess this has something to do with how Digital Ocean’s 18.04 servers are set up by default? Maybe even due to my selection of the droplet’s datacenter region (FRA)…?
Strange enough, guess many more people would have run into this, seems very specific.