# Ansible 2.13 yum module - requires minimum version of target python of 2.7 or 3.5. But I already have that

**URL:** <https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955>\
**Category:** Ansible Project\
**Created:** [August 5, 2022, 9:42pm UTC](https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955 "2022-08-05T21:42:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Barros](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@Daniel\_Barros](https://forum.ansible.com/u/Daniel_Barros)\
**Post date:** [August 5, 2022, 9:42pm UTC](https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955/1 "2022-08-05T21:42:43Z")

</div>

I have an Ansible (2.13) machine targeting a remote centOS 6 with Python 3.6.

Remote machine has python3.6 installed and variables are set like this:

$ ansible-inventory --host centos-6-vm

{

“ansible\_private\_key\_file”: “~/.ssh/id\_rsa”,

“ansible\_python\_interpreter”: “/usr/bin/python3.6”,

“ansible\_user”: “daniel”

}

Ansible can ping, setup and gather facts from target successfully.

But when trying to run the yum module, I get an error as if my server doesn’t have Python 3.6

This is my playbook

---

<div class="post-metadata">

**Author:** ![Nico\_Kadel-Garcia](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nico_kadel-garcia/32/9998_2.png) [@Nico\_Kadel-Garcia](https://forum.ansible.com/u/Nico_Kadel-Garcia)\
**Post date:** [August 6, 2022, 3:08pm UTC](https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955/2 "2022-08-06T15:08:05Z")

</div>

CentOS 6 is end-of-life. Even the primary mirror sites over at  
vault.centos.org don't work anymore.

That said, if you're staying on CentOS 6, do not use the raw "python"  
or "pip" command to install any of it. Use "python3" or "pip3".

&nbsp;&nbsp;&nbsp;&nbsp;pip3 install --user ansible-core

That will only get you the maximum ansible-core compatible with your  
release of python 3.

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [August 8, 2022, 1:29pm UTC](https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955/3 "2022-08-08T13:29:27Z")

</div>

The yum module within ansible requires the python yum bindings to work, and those are only available using Python 2.6. ansible-core 2.13 no longer supports Python 2.6, so there is no combination where you can use the yum module with ansible-core 2.13 on RHEL6.

The last version of ansible-core to support Python 2.6 for target execution was ansible-core 2.12.

---

<div class="post-metadata">

**Author:** ![Daniel\_Barros](https://avatars.discourse-cdn.com/v4/letter/d/7993a0/32.png) [@Daniel\_Barros](https://forum.ansible.com/u/Daniel_Barros)\
**Post date:** [August 8, 2022, 4:24pm UTC](https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955/4 "2022-08-08T16:24:15Z")

</div>

I appreciate the time and the answers.

My customer has an up-to-date Ansible but some server OS are still old.

So I’ll consider using the command module for this special case (yum rhel 6).

Thank you again.

Br,

Daniel

---

<div class="post-metadata">

**Author:** ![Nico\_Kadel-Garcia](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/nico_kadel-garcia/32/9998_2.png) [@Nico\_Kadel-Garcia](https://forum.ansible.com/u/Nico_Kadel-Garcia)\
**Post date:** [August 9, 2022, 2:59am UTC](https://forum.ansible.com/t/ansible-2-13-yum-module-requires-minimum-version-of-target-python-of-2-7-or-3-5-but-i-already-have-that/36955/5 "2022-08-09T02:59:47Z")

</div>

Note that ansible-core 2.12 is the default available version on RHEL  
8, because it's compatible with the built-in python 3.6, and is  
available from Red Hat repos as an RPM. So it's a supportable release  
on your ansible server, even if your server is on a commercially  
supported RHEL.
