mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Fixed cloudformation docs and updated EXAMPLES section in the docs for these AWS modules.
This commit is contained in:
parent
4a4958f6c9
commit
a7595a6964
3 changed files with 44 additions and 23 deletions
|
@ -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
|
||||
|
|
|
@ -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?).
|
||||
|
|
19
library/s3
19
library/s3
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue