mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-16 18:03:06 -06:00
DCD-1123: Add ability to add new instance to DNS.
This commit is contained in:
@@ -10,7 +10,11 @@
|
||||
resource_owner: "{{ ansible_user_id }}"
|
||||
aws_region: "us-west-2"
|
||||
ec2_termination_protection: True
|
||||
dns_domain: "deplops.com"
|
||||
|
||||
roles:
|
||||
- { role: aws-vpc }
|
||||
- { role: ec2-instance, vars: { instance_name: "Jira Software Migration Source Instance" } }
|
||||
- role: aws-vpc
|
||||
- role: ec2-instance
|
||||
vars:
|
||||
instance_name: "Jira Software Migration Source Instance"
|
||||
instance_hostname: "jira-software-before"
|
||||
|
||||
@@ -37,3 +37,13 @@
|
||||
service_name: "{{ instance_name}}"
|
||||
resource_owner: "{{ resource_owner }}"
|
||||
register: ec2_instance
|
||||
|
||||
- name: Add DNS entry for EC2 instance
|
||||
route53:
|
||||
command: create
|
||||
zone: "{{ dns_domain }}"
|
||||
type: CNAME
|
||||
record: "{{ instance_hostname }}.{{ dns_domain }}"
|
||||
value: "{{ ec2_instance.tagged_instances[0].dns_name }}"
|
||||
ttl: 60
|
||||
overwrite: true
|
||||
|
||||
Reference in New Issue
Block a user