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
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