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

1,818 views
Skip to first unread message

esxi...@gmail.com

unread,
Mar 8, 2021, 3:05:10 AM3/8/21
to Ansible Project

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

esxi...@gmail.com

unread,
Mar 8, 2021, 3:18:34 AM3/8/21
to Ansible Project
I just added 1 more & it was good for me

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

Reply all
Reply to author
Forward
0 new messages