*Issue:*
Trying to register an ec2 instance to an elb.  However, the ec2_elb module 
doesn't seem to work properly.  It claims that the ec2 instance does not 
exist.  However, when I manually registered the ec2 instance to the elb 
within aws console, then de-registered it, the ec2_elb module worked and 
was able to find and register the ec2 instance.  What is going on?


*Error:*

*TASK: [load_balancer | load_balancer add-instance] 
**************************** failed: [localhost] => {"failed": true, 
"item": "", "parsed": false}invalid output was: Traceback (most recent call 
last):  File 
"/home/joker/.ansible/tmp/ansible-1391200057.49-204883758324872/ec2_elb", 
line 1365, in <module>    main()  File 
"/home/joker/.ansible/tmp/ansible-1391200057.49-204883758324872/ec2_elb", 
line 291, in main    elb_man.register(wait, enable_availability_zone)  File 
"/home/joker/.ansible/tmp/ansible-1391200057.49-204883758324872/ec2_elb", 
line 154, in register    initial_state = 
lb.get_instance_health([self.instance_id])[0]  File 
"/usr/local/lib/python2.7/dist-packages/boto/ec2/elb/loadbalancer.py", line 
320, in get_instance_health    return 
self.connection.describe_instance_health(self.name, instances)  File 
"/usr/local/lib/python2.7/dist-packages/boto/ec2/elb/__init__.py", line 
525, in describe_instance_health    [('member', InstanceState)])  File 
"/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1131, in 
get_list    raise self.ResponseError(response.status, response.reason, 
body)boto.exception.BotoServerError: BotoServerError: 400 Bad 
Request<ErrorResponse 
xmlns="http://elasticloadbalancing.amazonaws.com/doc/2012-06-01/";>  
<Error>    <Type>Sender</Type>    <Code>InvalidInstance</Code>    
<Message>Could not find EC2 instance i-31d78911.</Message>  </Error>  
<RequestId>1ea2236c-8ab6-11e3-bd23-2fa2f62f90bf</RequestId></ErrorResponse>*

*play:*

- name: load_balancer add-instance
  sudo: false
  local_action: ec2_elb
  args: 
    aws_access_key: "{{ aws_default_access }}"
    aws_secret_key: "{{ aws_default_secret }}"
    ec2_elbs: "{{ elb_name }}"
    enable_availability_zone: yes
    instance_id: "{{ ec2_instance }}"
    region: us-east-1
    state: present
    wait: yes


-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to