- name: Get the facts about the ELB
ec2_elb_facts:
names: rbgeek-dev-web-elb
region: "eu-west-1"
register: elb_facts
- name: Instance(s) ID that are currently register to the ELB
debug:
msg: "{{ elb_facts.elbs.0.instances }}"
Then you can use the ec2_id to get it's ip address, may be a minor modification to this
plugin help you or you can find some other way to get it done.
Hope that point you to the right direction.