Commit d28961d3 by arbabnazar

Adding the DATE_Time tag inside provisioning script

parent f098cca9
......@@ -38,7 +38,6 @@
assign_public_ip: yes
terminate_instance: true
instance_profile_name: sandbox
instance_launch_time: "{{ hostvars['localhost']['ansible_date_time']['date'] + hostvars['localhost']['ansible_date_time']['time'] }}"
- name: Configure instance(s)
hosts: launched
......
......@@ -22,6 +22,10 @@ env
export PYTHONUNBUFFERED=1
export BOTO_CONFIG=/var/lib/jenkins/${aws_account}.boto
# This DATE_TIME will be used as instance launch time tag
DATE_TIME=`date +"%m-%d-%Y %T"`
if [[ -z $BUILD_USER ]]; then
BUILD_USER=jenkins
fi
......@@ -199,6 +203,7 @@ instance_tags:
Name: $name_tag
source: jenkins
owner: $BUILD_USER
instance_launch_time: $DATE_TIME
datadog: monitored
root_ebs_size: $root_ebs_size
name_tag: $name_tag
......
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