# Beware: yum module in 1.9.2 batches package installs

**URL:** <https://forum.ansible.com/t/beware-yum-module-in-1-9-2-batches-package-installs/18715>\
**Category:** Ansible Project\
**Created:** [July 9, 2015, 12:01pm UTC](https://forum.ansible.com/t/beware-yum-module-in-1-9-2-batches-package-installs/18715 "2015-07-09T12:01:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anand\_Buddhdev](https://avatars.discourse-cdn.com/v4/letter/a/51bf81/32.png) [@Anand\_Buddhdev](https://forum.ansible.com/u/Anand_Buddhdev)\
**Post date:** [July 9, 2015, 12:01pm UTC](https://forum.ansible.com/t/beware-yum-module-in-1-9-2-batches-package-installs/18715/1 "2015-07-09T12:01:13Z")

</div>

Hi Ansible users,

I updated from 1.9.1 to 1.9.2 and was bitten by a fundamental change in the yum module. Previously, if you had a task like this:

- yum: name={{ item }}  
with\_items:
- epel-release
- exim
- python-virtualenv

Then it would work, because Ansible would first use yum to install epel-release (which makes exim and other packages available), and then install the other packages.

However, Ansible \>= 1.9.2 is batching updates, and doing something like “yum install epel-release exim python-virtualenv”. This cannot work, because when evaluating this command, the epel repo isn’t yet available, and yum won’t find “exim” and “python-virtualenv”, and fail.

I appreciate the efficiency improvement in 1.9.2, but it changed the yum module’s behaviour in a major way, and it wasn’t even documented in the change log! I opened a bug report about this, but I don’t know how they’re going to resolve it.

[https://github.com/ansible/ansible/issues/11526](https://github.com/ansible/ansible/issues/11526)

In my own playbooks, I have worked around this by moving the installation of “epel-release” to an earlier task.

In the mean time, if you are using the yum module, beware when updating to 1.9.2!

Anand

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [July 9, 2015, 4:49pm UTC](https://forum.ansible.com/t/beware-yum-module-in-1-9-2-batches-package-installs/18715/2 "2015-07-09T16:49:09Z")

</div>

\<nod\> Yeah, sorry for the compat change in a stable release. None of  
us saw this potential corner case. We've decided that we're going to  
keep this because it is a bugfix, not just an optimization.  
Previously, if you were installing a package had a circular dependency  
with a package specified via a filename or URL there was no way to get  
it installed because the yum module would always try to install as two  
separate transactions. The new behaviour of installing as one  
transaction makes this work. It's also inline with what the yum  
command line would do if given multiple packages.

I'm adding notes to the yum module documentation and the ChangeLog  
about this change in behaviour.

-Toshio
