0

Hi I want to upgrade the ansible installation on a RHEL6 node, but i see two ansible binaries located in the same host i.e ansible, ansible-2.6

[user1@node1 ~]$ ansible --version
ansible 2.4.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/nsdauto/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.6/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.6.6 (r266:84292, Jun 11 2019, 11:01:44) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]
[user1@node1 ~]$ ansible-2.6 --version
ansible-2.6 2.4.2.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/nsdauto/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.6/site-packages/ansible
  executable location = /usr/bin/ansible-2.6
  python version = 2.6.6 (r266:84292, Jun 11 2019, 11:01:44) [GCC 4.4.7 20120313 (Red Hat 4.4.7-23)]

but when i check packages installed i see only ansible 2.4

[user1@node1 ~]$  rpm -qa | grep ansible
ansible-2.4.2.0-1.el6.noarch

i see both ansible and ansible-2.6 binaries use same config files and python compilers, are these two ansible installations essentially the same ? if so why one of it is named ansible-2.6

OR

do i actually have ansible-2.4 and ansible-2.6 both installed on the system and they are using same config files and modules ?

vajravelu
  • 1
  • 2

1 Answers1

1

Because both of them are installed to /usr/lib/python2.6/site-packages/ansible these are the same install of 2.4.2. Unclear as to what package made the ansible-2.6 symlink.

Staying on a supported version requires upgrading to Ansible 2.7 or later, which requires Python 2.7 or later. Such a python isn't the default on RHEL 6. Which has a limited life itself, so really you also want a newer distro like RHEL 7 or 8. These versions have a Red Hat Ansible Engine subscription, so which RPM to install gets a little bit less confusing.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
  • Moving up from RHEL 6 to RHEL 7 or 8 is probably the best choice. Latest versions of Ansible use Python 3, and afaik RHEL 6 doesn't have it. – Michael Hampton Sep 09 '19 at 17:05
  • Note: you won't be able to use ansible with python3 on RHEL7, because there is no yum module – ALex_hha Oct 08 '20 at 11:03