Ansible ec2_eni error solution

If you’re using Ansible with the AWS EC2 plugin ec2_eni and getting this error:

AttributeError: 'NetworkInterface' object has no attribute 'attach'

The problem is that the boto NetworkInterface object indeed does not have anything called “attach” — you’re probably using an old version of boto; “attach” was added somewhere between 2.20 and 2.38. So, upgrading your boto version should fix it.

First, check that you don’t have boto installed via your package manager; I opened Ubuntu’s Software Sources and searched for boto, sure enough had to uninstall it.

Then, install the latest version with “sudo pip install boto”. Should work now!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s