Fresh Fedora Server Netinstall. Updated. Installed only Git and Ansible latest versions from standard repo.

Want to execute Ansible against it's own host (localhost) to set up its host itself (not using ansible-pull). Copied ssh-keys. Connected via SSH as non-root user, but with root rights from some remote machine, Git-pulled my Ansible inventory.

$ ansible --version => ansible 2.9.6
$ python --version => Python 3.7.6

So, Ansible is installed and accessible. However, when running

ansible-paybook play/bastion.yml --tags nvim:install --ask-vault-pass

i do get -bash: ansible-playbook: command not found. Same for other sub-commands.

When going into machine directly with the same user ansible-playbook works as expected.

What could be wrong with SSH'ing into it?

Ideally i shouldn't (don't need) to SSHch into it, because eventually i will call ansible-pull. This is only for 'polishing' playbooks against vanilla machine because tty is not so comfortable to use.


1 Answer 1


I think it's path environment variable issue, that means that the user profile is not loaded when doing ssh, check your PATH when doing ssh and without ( locally ) and compare bothe

echo $PATH

If so then check your ssh configuration file and enable PermitUserEnvironment.

  • Tnx. Yeah.. this is what I am investigating now. Will come back later to reply what i found.
    – Dzintars
    Mar 21, 2020 at 22:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.