mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-17 02:13: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 }}"
|
resource_owner: "{{ ansible_user_id }}"
|
||||||
aws_region: "us-west-2"
|
aws_region: "us-west-2"
|
||||||
ec2_termination_protection: True
|
ec2_termination_protection: True
|
||||||
|
dns_domain: "deplops.com"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
- { role: aws-vpc }
|
- role: aws-vpc
|
||||||
- { role: ec2-instance, vars: { instance_name: "Jira Software Migration Source Instance" } }
|
- role: ec2-instance
|
||||||
|
vars:
|
||||||
|
instance_name: "Jira Software Migration Source Instance"
|
||||||
|
instance_hostname: "jira-software-before"
|
||||||
|
|||||||
@@ -37,3 +37,13 @@
|
|||||||
service_name: "{{ instance_name}}"
|
service_name: "{{ instance_name}}"
|
||||||
resource_owner: "{{ resource_owner }}"
|
resource_owner: "{{ resource_owner }}"
|
||||||
register: ec2_instance
|
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