Commit d6ea8fb0 by Feanil Patel

Add tags to the Abbey AMIs.

parent 788ff98e
......@@ -517,7 +517,6 @@ def create_ami(instance_id, name, description):
'no_reboot': True}
image_id = ec2.create_image(**params)
for _ in xrange(AMI_TIMEOUT):
try:
img = ec2.get_image(image_id)
......@@ -535,6 +534,17 @@ def create_ami(instance_id, name, description):
else:
raise Exception("Timeout waiting for AMI to finish")
image = ec2.get_all_images([image_id])[0]
image.add_tag("environment", args.environment)
image.add_tag("deployment", args.deployment)
image.add_tag("play", args.play)
image.add_tag("configuration_ref", args.configuration_version)
image.add_tag("configuration_secure_ref", args.configuration_secure_version)
image.add_tag("configuration_secure_repo", args.configuration_secure_repo)
for repo,ref in git_refs:
key = "vars:{}".format(repo)
image.add_tag(key, ref)
return image_id
......
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