Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
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
ansible
Commits
b5339fe3
Commit
b5339fe3
authored
May 05, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update eucalyptus/ec2 example
parent
264f527c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
examples/playbooks/eucalyptus-ec2.yml
+3
-3
No files found.
examples/playbooks/eucalyptus-ec2.yml
View file @
b5339fe3
...
...
@@ -21,19 +21,19 @@
tasks
:
-
name
:
Launch instance
local_action
:
ec2 keypair=
$keypair group=$security_group instance_type=$instance_type image=$image
wait=true count=5
local_action
:
ec2 keypair=
{{keypair}} group={{security_group}} instance_type={{instance_type}} image={{image}}
wait=true count=5
register
:
ec2
# Use with_items to add each instances public IP to a new hostgroup for use in the next play.
-
name
:
Add new instances to host group
local_action
:
add_host hostname=
${item.public_ip
} groupname=deploy
local_action
:
add_host hostname=
{{item.public_ip}
} groupname=deploy
with_items
:
${ec2.instances}
# Use the ec2_vol module to create volumes for attachment to each instance. Use with_items to attach to each instance (by returned id) launched previously.
-
name
:
Create a volume and attach
local_action
:
ec2_vol volume_size=20 instance=
${item.id
}
local_action
:
ec2_vol volume_size=20 instance=
{{item.id}
}
with_items
:
${ec2.instances}
# This play targets the new host group
...
...
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