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
a7595a69
Commit
a7595a69
authored
Apr 25, 2013
by
Lester Wade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed cloudformation docs and updated EXAMPLES section in the docs for these AWS modules.
parent
4a4958f6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
23 deletions
+44
-23
library/cloudformation
+6
-6
library/ec2_vol
+24
-12
library/s3
+14
-5
No files found.
library/cloudformation
View file @
a7595a69
...
...
@@ -67,12 +67,15 @@ options:
default: "yes"
choices: [ "yes", "no" ]
aliases: []
requirements: [ "boto" ]
author: James S. Martin
'''
examples:
EXAMPLES
=
'''
# Basic task example
tasks:
- name: launch ansible cloudformation example
cloudformation:
>
action: cloudformation
>
stack_name="ansible-cloudformation" state=present
region=us-east-1 disable_rollback=yes
template=files/cloudformation-example.json
...
...
@@ -82,9 +85,6 @@ examples:
DiskType: ephemeral
InstanceType: m1.small
ClusterSize: 3
requirements: [ "boto" ]
author: James S. Martin
'''
import
boto.cloudformation.connection
...
...
library/ec2_vol
View file @
a7595a69
...
...
@@ -52,22 +52,34 @@ options:
required: false
default: null
aliases: []
examples:
- code: 'local_action: ec2_vol instance=XXXXXX volume_size=5 device_name=sdd'
description: "Simple playbook example"
- code: |
- name: Launch instances
local_action: ec2 keypair=$keypair image=$image wait=yes 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
description: "Advanced - attaching multiple volumes to multiple instances"
requirements: [ "boto" ]
author: Lester Wade
'''
EXAMPLES
=
'''
# Simple attachment action
local_action:
module: ec2_vol
instance: XXXXXX
volume_size: 5
device_name: sdd
# Playbook example combined with instance launch
local_action:
module: ec2
keypair: $keypair
image: $image
wait: yes
count: 3
register: ec2
local_action:
module: ec2_vol
instance: ${item.id}
volume_size: 5
with_items: ${ec2.instances}
register: ec2_vol
'''
# Note: this module needs to be made idempotent. Possible solution is to use resource tags with the volumes.
# if state=present and it doesn't exist, create, tag and attach.
# Check for state by looking for volume attachment with tag (and against block device mapping?).
...
...
library/s3
View file @
a7595a69
...
...
@@ -51,15 +51,24 @@ options:
required: false
default: false
version_added: "1.2"
examples:
- code: 's3 bucket=mybucket path=/path/to/file state=present'
description: "Simple playbook example"
- code: 's3 bucket=mybucket path=/path/to/file state=present overwrite=yes'
description: "Will overwrite only if remote and local checksums do not match. Does not support files uploaded to s3 with multipart upload."
requirements: [ "boto" ]
author: Lester Wade
'''
EXAMPLES
=
'''
# Simple PUT operation
module: s3
bucket: mybucket
path: /path/to/file
state: present
# Force and overwrite if checksums don't match
module: s3
bucket: mybucket
path: /path/to/file
state: present
overwrite: yes
'''
import
sys
import
os
import
urlparse
...
...
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