Commit 542dd4f0 by John Jarvis

get instance id

parent 8098771a
......@@ -33,12 +33,19 @@
# in as a -e variable
- gh_users
post_tasks:
- name: get instance id for elb registration
local_action:
module: ec2_lookup
region: us-east-1
tags:
Name: "{{ name_tag }}"
register: ec2_info
when: elb
- name: register instance into an elb if one was provided
local_action:
module: ec2_elb
region: "{{ region }}"
instance_id: "{{ item }}"
instance_id: "{{ ec2_info.instance_ids[0] }}"
ec2_elbs:
- "{{ elb }}"
with_items: "{{ ec2.instances }}"
when: elb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment