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
0a2a6478
Commit
0a2a6478
authored
Feb 14, 2013
by
lwade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated comments and closed code example.
parent
8617b6df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
library/ec2_vol
+7
-5
No files found.
library/ec2_vol
View file @
0a2a6478
...
...
@@ -24,19 +24,19 @@ version_added: "1.1"
options:
instance:
description:
- instance ID
- instance ID
if you wish to attach the volume.
required: false
default: null
aliases: []
volume_size:
description:
- size of volume (in GB)
- size of volume (in GB)
to create.
required: true
default: null
aliases: []
device_name:
description:
- device id to override device mapping.
Normally
/dev/sdf for instance-store, /dev/sdb for EBS.
- device id to override device mapping.
Assumes
/dev/sdf for instance-store, /dev/sdb for EBS.
required: false
default: null
aliases: []
...
...
@@ -52,11 +52,10 @@ examples:
- code: '- name: Launch instances
local_action: ec2 keypair=$keypair image=$image wait=true count=3
register: ec2
- name: Create volumes and attach
local_action: ec2_vol instance=${item.id} volume_size=5
with_items: ${ec2.instances}
register: ec2_vol
register: ec2_vol
'
description: "Advanced playbook example"
requirements: [ "boto" ]
author: Lester Wade
...
...
@@ -141,6 +140,9 @@ def main():
# If device_name isn't set, make a choice based on best practices here:
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
# In future this needs to be more dynamic but combining block device mapping best practices
# (bounds for devices, as above) with instance.block_device_mapping data would be tricky. For me ;)
if
device_name
is
None
and
instance
:
try
:
...
...
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