Problem with Retrieve SSH client IP


#1

TASK [common : Retrieve SSH client IP] *****************************************
System info:
Ansible 2.5.2; Darwin
Trellis version (per changelog): “Add xdebug.remote_autostart to simplify xdebug sessions”

MODULE FAILURE
/bin/sh: /usr/bin/python: No such file or directory

fatal: [willamilonga.pl]: FAILED! => {“changed”: false, “module_stdout”: “”, “rc”: 127}


#2

I have not encountered this error before - any clues? This happens while provisioning server.


#3

I only recall seeing that error when someone was using an old version of Trellis (without this task; is that task running for you?) and provisioning a fresh Ubuntu 16.04, but typically sooner than the task where you encounter the error.

As a workaround, try the steps here:


#4

Phil - thank you for your interest, and help. Actually the workaround did help (though I still don’t understand the connection between my IP and server shouting it can’t find python in /usr/bin directory). Actually there is python in /usr/bin, so it’s even more weird. And also - this task is running, and executes without any problem. The weirdness gets even deeper - as I told you, your workaround helped with Retrieve SSH client IP task, but now I get the same error with wordpress-setup : Build list of Nginx includes templates task. Check it out:

TASK [wordpress-setup : Build list of Nginx includes templates] ****************
System info:
Ansible 2.5.2; Darwin
Trellis version (per changelog): “Add xdebug.remote_autostart to simplify xdebug sessions”

MODULE FAILURE
/bin/sh: /usr/bin/python: No such file or directory

fatal: [willamilonga.pl]: FAILED! => {“changed”: false, “module_stdout”: “”, “rc”: 127}


#5

the only thing in my setup that changed lately is updating Ansible. Might it be the problem?


#6

Ok, I know what the problem was. I’ll post it in case someone encounters this error again. This module failure:

MODULE FAILURE
/bin/sh: /usr/bin/python: No such file or directory

I assumed it happened while Ansible was doing tasks on the Server, but it happened only on tasks that had ‘connection: local’ variable set. I don’t know anything about Ansible, but I though that maybe it’s something, that is executed on client machine, instead of server? That led me to remind myself, that indeed I don’t have python in /usr/bin/python, because lately I decided to install everything with Homebrew, and it puts executives in /usr/local/bin directory. So I just did a symbolic link with ln -s /usr/local/bin/python /usr/bin/python and run provision again. This time it worked well.