ansible failing on Amazon Linux 2015.03

Amazon released Amazon Linux 2015.03 today and as result they moved the core version of Python from 2.6 to 2.7. I now get the following error when attempting to run unusable playbook on this new release.

failed: [xxx.xxx.xxx.xxx] => (item=htop,git,mysql) => {“failed”: true, “item”: “htop,git,mysql”, “parsed”: false}

SUDO-SUCCESS-oryamgsbitlsxgamrewinmkijqtgpnys

Traceback (most recent call last):

File “/home/ec2-user/.ansible/tmp/ansible-tmp-1427300667.75-234664212906684/yum”, line 27, in

import yum

ImportError: No module named yum

Any idea how to get around this problem?

so the yum module uses the python yum library which is normally
installed on systems that use yum by default.

In the latest amazon linux it seems they did add the module for
python2.6 but not to python2.7, you will need to either install this
python library before being able to use the yum module with python2.7
or just set ansible_python_interpreter to point at the 2.6 one.

It's the other way around, python2.6 isn't shipped with the yum
module. Some people already reported this in the aws forums [1] [2],
and it can be corrected in already running instances by setting the
correct python version using the 'alternatives' command, shown in both
posts and in the release notes [3].

Also, they already fixed that in the repository, so newly launched
instances get this fixed during the automatic upgrade of a first
booted instance using Amazon Linux.

[1] https://forums.aws.amazon.com/thread.jspa?threadID=174345
[2] https://forums.aws.amazon.com/thread.jspa?threadID=174341
[3] https://aws.amazon.com/pt/amazon-linux-ami/2015.03-release-notes/

I sit corrected.