This won't have anything to do with your ec2 module. I suspect you are accidentally doing a local action on your Mac, or you have ansible_python_interpreter on your remotes pointed to a python that is not the system python, as yum will be installed in the system python.
Let me know if you need more info. Thanks! On Thu, Aug 28, 2014 at 1:52 PM, Cynthia Hertzer <[email protected]> wrote: > > > On Wednesday, February 13, 2013 2:39:00 PM UTC-8, James Nguyễn wrote: >> >> Has anyone come across this error below? >> >> <stuff deleted> > > I used to be able to use vagrant + ansible to provision EC2 instances and > run yum installs from my laptop (OSX 10.8.5), but after converting my > scripts to use the ansible EC2 module, yum fails (ImportError shown > below). I suspect that installing boto introduced some incompatibility on > my Mac. I'm inexperienced with Python and would welcome any suggestions. At > this point I'm going to try setting up a CentOS EC2 instance as my ansible > box to workaround this problem. > > Environment > OSX 10.8.5 > Python 2.7.2 (Xcode... default in /usr/bin/python ... definitely the one > ansible references, it's my only Python) > ansible (1.7.1) > boto (2.32.1) > botocore (0.57.0) > simplejson (2.0.9) (tried a >v3 simplejson but no joy) > > TASK: [common | Yum update] > *************************************************** > failed: [localhost] => {"failed": true, "parsed": false} > invalid output was: Traceback (most recent call last): > File > "/Users/chertzer/.ansible/tmp/ansible-tmp-1409246926.89-9783608709566/yum", > line 27, in <module> > import yum > ImportError: No module named yum > > Thanks! > Cynthia > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/b05c4023-5fcf-4e02-9e54-5691f6b37e64%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/b05c4023-5fcf-4e02-9e54-5691f6b37e64%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgzRokcs5dPq1w2tOopLFhTtTL%3D-i4BBPxkH5guLV6iQNw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
