Commit ed847dc5 by Brian Beggs

prefix keys and instances with the same text

parent 223ab101
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
ebs_volume_size: 8 ebs_volume_size: 8
ec2_timeout: 500 ec2_timeout: 500
ec2_assign_public_ip: no ec2_assign_public_ip: no
gather_facts: False automtion_prefix: "gocd automation run -- {{ ansible_date_time.iso8601 }} -- "
gather_facts: True
connection: local connection: local
tasks: tasks:
...@@ -40,7 +41,7 @@ ...@@ -40,7 +41,7 @@
- name: Generate ec2 keypair to use for this instance - name: Generate ec2 keypair to use for this instance
ec2_key: ec2_key:
name: "{{ unique_key_name.stdout }}" name: "{{ automtion_prefix }} {{ unique_key_name.stdout }}"
region: "{{ ec2_region }}" region: "{{ ec2_region }}"
register: ssh_key_register register: ssh_key_register
...@@ -52,7 +53,7 @@ ...@@ -52,7 +53,7 @@
- name: Launch EC2 instance - name: Launch EC2 instance
ec2: ec2:
instance_tags: {"Name" : "gocd automation run -- {{ unique_key_name.stdout }}"} instance_tags: {"Name" : "{{ automtion_prefix }} {{ unique_key_name.stdout }}"}
region: "{{ ec2_region }}" region: "{{ ec2_region }}"
key_name: "{{ unique_key_name.stdout }}" key_name: "{{ unique_key_name.stdout }}"
instance_type: "{{ ec2_instance_type }}" instance_type: "{{ ec2_instance_type }}"
......
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