Commit 82e09834 by John Jarvis

updating for dns name using route53 module

parent 3783b745
......@@ -11,7 +11,7 @@
region: "{{ region }}"
instance_tags: "{{ instance_tags }}"
size: "{{ size }}"
dns_name: "{{ dns_name }}"
- name: Configure instance(s)
hosts: launched
......@@ -19,3 +19,4 @@
gather_facts: True
tasks:
- debug: msg="test"
......@@ -14,14 +14,50 @@
size: "{{ size }}"
register: ec2
- name: launch_instance | Add new instance to host group
- name: launch_ec2 | Add DNS name
local_action:
module: route53
command: create
zone: sandbox.edx.org
type: CNAME
ttyl: 300
record: "{{ dns_name }}"
value: "{{ item.public_dns_name }}"
with_items: "{{ ec2.instances }}"
- name: launch_ec2 | Add DNS name studio
local_action:
module: route53
command: create
zone: sandbox.edx.org
type: CNAME
ttyl: 300
record: "studio.{{ dns_name }}"
value: "{{ item.public_dns_name }}"
with_items: "{{ ec2.instances }}"
- name: launch_ec2 | Add DNS name preview
local_action:
module: route53
command: create
zone: sandbox.edx.org
type: CNAME
ttyl: 300
record: "preview.{{ dns_name }}"
value: "{{ item.public_dns_name }}"
with_items: "{{ ec2.instances }}"
- name: launch_ec2 | Add new instance to host group
local_action: >
add_host
hostname={{ item.public_ip }}
groupname=launched
with_items: "{{ ec2.instances }}"
- name: launch_instance | Wait for SSH to come up
- name: launch_ec2 | Wait for SSH to come up
local_action: >
wait_for
host={{ item.public_dns_name }}
......
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