1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

[docs] Clean up the cloudformation examples (#31770)

- added `role_arn` to the "role example" example
- removed the irrelevant parameters to the "role example" example
- updated comment on one of the examples
- removed the last example as it was a duplicate of "role example" example
- some other minor changes
This commit is contained in:
Prasad Katti 2017-10-16 05:53:10 -07:00 committed by Ryan Brown
parent f94ef03625
commit 30fd1870f3

View file

@ -127,8 +127,7 @@ requirements: [ boto3, botocore>=1.4.57 ]
''' '''
EXAMPLES = ''' EXAMPLES = '''
# Basic task example - name: create a cloudformation stack
- name: launch ansible cloudformation example
cloudformation: cloudformation:
stack_name: "ansible-cloudformation" stack_name: "ansible-cloudformation"
state: "present" state: "present"
@ -144,54 +143,29 @@ EXAMPLES = '''
Stack: "ansible-cloudformation" Stack: "ansible-cloudformation"
# Basic role example # Basic role example
- name: launch ansible cloudformation example - name: create a stack, specify role that cloudformation assumes
cloudformation: cloudformation:
stack_name: "ansible-cloudformation" stack_name: "ansible-cloudformation"
state: "present" state: "present"
region: "us-east-1" region: "us-east-1"
disable_rollback: true disable_rollback: true
template: "roles/cloudformation/files/cloudformation-example.json" template: "roles/cloudformation/files/cloudformation-example.json"
template_parameters: role_arn: 'arn:aws:iam::123456789012:role/cloudformation-iam-role'
KeyName: "jmartin"
DiskType: "ephemeral"
InstanceType: "m1.small"
ClusterSize: 3
tags:
Stack: "ansible-cloudformation"
# Removal example - name: delete a stack
- name: tear down old deployment
cloudformation: cloudformation:
stack_name: "ansible-cloudformation-old" stack_name: "ansible-cloudformation-old"
state: "absent" state: "absent"
# Use a template from a URL # Create a stack, pass in template from a URL, disable rollback if stack creation fails,
- name: launch ansible cloudformation example # pass in some parameters to the template, provide tags for resources created
- name: create a stack, pass in the template via an URL
cloudformation: cloudformation:
stack_name: "ansible-cloudformation" stack_name: "ansible-cloudformation"
state: present state: present
region: us-east-1 region: us-east-1
disable_rollback: true disable_rollback: true
template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template
args:
template_parameters:
KeyName: jmartin
DiskType: ephemeral
InstanceType: m1.small
ClusterSize: 3
tags:
Stack: ansible-cloudformation
# Use a template from a URL, and assume a role to execute
- name: launch ansible cloudformation example with role assumption
cloudformation:
stack_name: "ansible-cloudformation"
state: present
region: us-east-1
disable_rollback: true
template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template
role_arn: 'arn:aws:iam::123456789012:role/cloudformation-iam-role'
args:
template_parameters: template_parameters:
KeyName: jmartin KeyName: jmartin
DiskType: ephemeral DiskType: ephemeral