Fixed cloudformation docs and updated EXAMPLES section in the docs for these AWS modules.

reviewable/pr18780/r1
Lester Wade 12 years ago
parent 00fc43d676
commit 62a10d69a1

@ -67,12 +67,15 @@ options:
default: "yes" default: "yes"
choices: [ "yes", "no" ] choices: [ "yes", "no" ]
aliases: [] aliases: []
requirements: [ "boto" ]
author: James S. Martin
'''
examples: EXAMPLES = '''
# Basic task example
tasks: tasks:
- name: launch ansible cloudformation example - name: launch ansible cloudformation example
cloudformation: > action: cloudformation >
stack_name="ansible-cloudformation" state=present stack_name="ansible-cloudformation" state=present
region=us-east-1 disable_rollback=yes region=us-east-1 disable_rollback=yes
template=files/cloudformation-example.json template=files/cloudformation-example.json
@ -82,9 +85,6 @@ examples:
DiskType: ephemeral DiskType: ephemeral
InstanceType: m1.small InstanceType: m1.small
ClusterSize: 3 ClusterSize: 3
requirements: [ "boto" ]
author: James S. Martin
''' '''
import boto.cloudformation.connection import boto.cloudformation.connection

@ -52,20 +52,32 @@ options:
required: false required: false
default: null default: null
aliases: [] aliases: []
examples: requirements: [ "boto" ]
- code: 'local_action: ec2_vol instance=XXXXXX volume_size=5 device_name=sdd' author: Lester Wade
description: "Simple playbook example" '''
- code: |
- name: Launch instances EXAMPLES = '''
local_action: ec2 keypair=$keypair image=$image wait=yes count=3 # 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 register: ec2
- name: Create volumes and attach local_action:
local_action: ec2_vol instance=${item.id} volume_size=5 module: ec2_vol
instance: ${item.id}
volume_size: 5
with_items: ${ec2.instances} with_items: ${ec2.instances}
register: ec2_vol register: ec2_vol
description: "Advanced - attaching multiple volumes to multiple instances"
requirements: [ "boto" ]
author: Lester Wade
''' '''
# Note: this module needs to be made idempotent. Possible solution is to use resource tags with the volumes. # Note: this module needs to be made idempotent. Possible solution is to use resource tags with the volumes.

19
s3

@ -51,15 +51,24 @@ options:
required: false required: false
default: false default: false
version_added: "1.2" 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" ] requirements: [ "boto" ]
author: Lester Wade 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 sys
import os import os
import urlparse import urlparse

Loading…
Cancel
Save