Host: command output differs on localhost and FQDN

Hi,

I am trying to run the following playbook:

`

It'll be a path thing most likely. It's in your path on localhost, and
not on the account you're using remotely.

Hi Dick,

This indeed seems to be the case when I compared paths. How is this possible? The ‘remote’ machine is the exact same machine as the ‘localhost’, I only just connect by FQDN.

That is a feature with the shell.
Most shell(at least sh and bash do) have two mode interactive shell and non interactive shell.
Interactive shell is when you log in and get a prompt, non interactive is when you run commands over ssh.

The two mode reads different environment file (man sh or bash to read more about it).

When you are running with localhost you are executing the commands with you interactive shell, but when you use FQDN you are ssh in to the host and get the not interactive shell.

Cool, did not know that! Thnx for your help.