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
OpenEdx
configuration
Commits
13d7fd75
Commit
13d7fd75
authored
Nov 05, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing names of tasks in launch_ec2
parent
f0348d2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
13 deletions
+14
-13
playbooks/roles/launch_ec2/tasks/main.yml
+14
-13
No files found.
playbooks/roles/launch_ec2/tasks/main.yml
View file @
13d7fd75
# Launches an ec2 instance and blocks until the instance is up
# adds it to the host group
# adds it to the host group
# Will terminate an instance if one and only one already exists
# with the same name
-
name
:
lookup tags for terminating existing instance
-
name
:
l
aunch_ec2 | l
ookup tags for terminating existing instance
local_action
:
module
:
ec2_lookup
region
:
"
{{
region
}}"
...
...
@@ -12,7 +12,8 @@
register
:
tag_lookup
when
:
terminate_instance ==
true
-
debug
:
msg="Too many results returned, not terminating!"
-
name
:
launch_ec2 | checking for other instances
debug
:
msg="Too many results returned, not terminating!"
when
:
terminate_instance ==
true
and tag_lookup.instance_ids|length > 1
-
name
:
terminating single instance
...
...
@@ -23,14 +24,14 @@
instance_ids
:
${tag_lookup.instance_ids}
when
:
terminate_instance ==
true
and tag_lookup.instance_ids|length == 1
-
name
:
launch_ec2 | Launch ec2 instance
local_action
:
module
:
ec2
-
name
:
launch_ec2 | Launch ec2 instance
local_action
:
module
:
ec2
keypair
:
"
{{
keypair
}}"
group
:
"
{{
security_group
}}"
instance_type
:
"
{{
instance_type
}}"
image
:
"
{{
ami
}}"
wait
:
true
wait
:
true
region
:
"
{{
region
}}"
instance_tags
:
"
{{instance_tags}}"
root_ebs_size
:
"
{{
root_ebs_size
}}"
...
...
@@ -75,17 +76,17 @@
-
name
:
launch_ec2 | Add new instance to host group
local_action
:
>
add_host
hostname={{ item.public_ip }}
groupname=launched
add_host
hostname={{ item.public_ip }}
groupname=launched
with_items
:
"
{{
ec2.instances
}}"
-
name
:
launch_ec2 | Wait for SSH to come up
local_action
:
>
wait_for
wait_for
host={{ item.public_dns_name }}
state=started
port=22
delay=60
port=22
delay=60
timeout=320
with_items
:
"
{{
ec2.instances
}}"
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