Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
b92c0b02
Commit
b92c0b02
authored
Nov 30, 2016
by
Brian Beggs
Committed by
GitHub
Nov 30, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3508 from edx/bbeggs/TE-1868
add override for the ami_id used to launch an instance
parents
1f4c8404
81039478
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
playbooks/continuous_delivery/launch_instance.yml
+14
-2
No files found.
playbooks/continuous_delivery/launch_instance.yml
View file @
b92c0b02
...
...
@@ -13,10 +13,12 @@
# - ebs_volume_size - Size in GB for the root volume
# - ec2_timeout - Time in seconds to wait for an ec2 instance become available
# - ec2_assign_public_ip - (yes/no) should the instance have a public IP address?
# - ami_id - overrides 'base_ami_id' (used when passing in the ami.yml file produced by
# the create_ami.yml ansilble script)
#
# This playbook generates a directory with 2 artifact files:
# - launch_template.yml - A yaml file with information such as the instance ID and internal IP address of the instance launched
# - key.pem
- The private key file for the newly generated keypair
# - key.pem - The private key file for the newly generated keypair
#
# Example command line to run this playbook:
# ansible-playbook -i "localhost," -c local -e @overrides.yml launch_instance.yml
...
...
@@ -51,13 +53,23 @@
state
:
directory
force
:
yes
-
name
:
Use ami_id if available
set_fact
:
launch_ami_id
:
"
{{
ami_id
}}"
when
:
ami_id is defined
-
name
:
Use base_ami_id if ami_id is not available
set_fact
:
launch_ami_id
:
"
{{
base_ami_id
}}"
when
:
ami_id is not defined
-
name
:
Launch EC2 instance
ec2
:
instance_tags
:
{
"
Name"
:
"
{{
automation_prefix
}}
{{
unique_key_name.stdout
}}"
}
region
:
"
{{
ec2_region
}}"
key_name
:
"
{{
automation_prefix
}}
{{
unique_key_name.stdout
}}"
instance_type
:
"
{{
ec2_instance_type
}}"
image
:
"
{{
base
_ami_id
}}"
image
:
"
{{
launch
_ami_id
}}"
wait
:
yes
group_id
:
"
{{
ec2_security_group_id
}}"
count
:
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment