executable location = /usr/local/bin/ansible VS executable location = /bin/ansible

Hi Folks

Anyone can suggest anything for below problem

For root user i see below for path :

root: ~ $ # ansible --version
ansible 2.10.6
config file = /etc/ansible/ansible.cfg
configured module search path = [‘/root/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
executable location = /bin/ansible
python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
root: ~ $ #

On the same box for Jenkins user i see below

ansible --version
ansible 2.10.6
config file = /etc/ansible/ansible.cfg
configured module search path = [‘/var/lib/jenkins/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = /usr/local/lib/python3.6/site-packages/ansible
executable location = /usr/local/bin/ansible
python version = 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

I think it is breaking stuff for me …

So i did

ln -s /usr/local/bin/ansible /bin/ansible

but still no luck

here is internally the issue is with Ansible jenkins plaugin …

java.io.IOException: Cannot run program “ansible-playbook” (in directory “/var/lib/jenkins/workspace/Project Create-VM-Paramater-new-V1”): error=2, No such file or directory

thanks

Kiran

I just added 1 more & it was good for me

ln -s /usr/local/bin/ansible-playbook /bin/ansible-playbook