Hello!
I may be doing something wrong, but I tried so many different things, I though it should report just in case. So far, I've tried Ansible 1.5 built from the repository and from Debian testing, and Ansible 1.6 (build from today's devel branch state). Also, I've tried with python-boto 2.9.x (from Ubuntu Saucy), 2.25 (Debian testing), and 2.27 (Debian unstable). The platform I'm running on is Debian Wheezy because I wanted everything else to be rock-solid.
I've tried simplifying my DNS settings to just leaving "nameserver 8.8.8.8" just in case it was a DNS issue.
Here is the absolutely trivial ec2_elb_lb configuration that fails and the error it fails with. This is the example almost straight out of the online manual. I started with a much more complicated config and eventually decided to trivialize it to see if the error still recurs, and indeed it does.
===================================================
name: Start load-balancers
ec2_elb_lb:
aws_access_key: "{{ ec2_access_key }}"
aws_secret_key: "{{ ec2_secret_key }}"
name: "test-please-delete"
state: present
zones:
- us-east-1a
- us-east-1d
listeners:
- protocol: http # options are http, https, ssl, tcp
load_balancer_port: 80
instance_port: 80
===================================================
When ansible gets to this task, it hangs for a while and then reports the following error. Since the error occurs in python-httplib2, I tried updating it from 0.7 (Debian wheezy) to 0.8 (Debian testing), but that didn't help either:
TASK: [Start load-balancers] **************************************************
failed: [localhost] => {"failed": true, "parsed": false}
invalid output was: Traceback (most recent call last):
File "/root/.ansible/tmp/ansible-tmp-1396624105.37-127079892448911/ec2_elb_lb", line 1880, in <module>
main()
File "/root/.ansible/tmp/ansible-tmp-1396624105.37-127079892448911/ec2_elb_lb", line 503, in main
aws_secret_key, region=region)
File "/root/.ansible/tmp/ansible-tmp-1396624105.37-127079892448911/ec2_elb_lb", line 210, in __init__
self.elb = self._get_elb()
File "/root/.ansible/tmp/ansible-tmp-1396624105.37-127079892448911/ec2_elb_lb", line 266, in _get_elb
elbs = self.elb_conn.get_all_load_balancers()
File "/usr/lib/python2.7/dist-packages/boto/ec2/elb/__init__.py", line 124, in get_all_load_balancers
[('member', LoadBalancer)])
File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 1143, in get_list
response = self.make_request(action, params, path, verb)
File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 1089, in make_request
return self._mexe(http_request)
File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 922, in _mexe
request.body, request.headers)
File "/usr/lib/python2.7/httplib.py", line 962, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 996, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 958, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 818, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 780, in send
self.connect()
File "/usr/lib/python2.7/dist-packages/boto/https_connection.py", line 111, in connect
sock.connect((self.host, self.port))
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -2] Name or service not known
FATAL: all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
Many Thanks!
iordan