When executing Ansible using another user from the master or management node, a command not found error occurs.

  $ ansible
  bash: ansible: command not found
Command not found

Ansible was installed using another user (ec2-user). The executable is installed on the user’s local bin.

  $ which ansible
  /usr/local/bin/ansible

This is resolved by moving ansible from /usr/local/bin to /usr/bin

  $ mv /usr/local/bin/ansible /usr/bin
Command not found