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

Since the ec2 parameter is named 'key_name' and 'keypair' is just an alias, use

the primary name of the parameter in the examples.
This commit is contained in:
Michael DeHaan 2014-02-28 13:52:47 -05:00
parent 5443ddec75
commit bbb88517ef

View file

@ -232,7 +232,7 @@ EXAMPLES = '''
# Basic provisioning example # Basic provisioning example
- local_action: - local_action:
module: ec2 module: ec2
keypair: mykey key_name: mykey
instance_type: c1.medium instance_type: c1.medium
image: emi-40603AD1 image: emi-40603AD1
wait: yes wait: yes
@ -242,7 +242,7 @@ EXAMPLES = '''
# Advanced example with tagging and CloudWatch # Advanced example with tagging and CloudWatch
- local_action: - local_action:
module: ec2 module: ec2
keypair: mykey key_name: mykey
group: databases group: databases
instance_type: m1.large instance_type: m1.large
image: ami-6e649707 image: ami-6e649707
@ -256,7 +256,7 @@ EXAMPLES = '''
# Single instance with additional IOPS volume from snapshot # Single instance with additional IOPS volume from snapshot
local_action: local_action:
module: ec2 module: ec2
keypair: mykey key_name: mykey
group: webserver group: webserver
instance_type: m1.large instance_type: m1.large
image: ami-6e649707 image: ami-6e649707
@ -273,7 +273,7 @@ local_action:
# Multiple groups example # Multiple groups example
local_action: local_action:
module: ec2 module: ec2
keypair: mykey key_name: mykey
group: ['databases', 'internal-services', 'sshable', 'and-so-forth'] group: ['databases', 'internal-services', 'sshable', 'and-so-forth']
instance_type: m1.large instance_type: m1.large
image: ami-6e649707 image: ami-6e649707
@ -287,7 +287,7 @@ local_action:
# Multiple instances with additional volume from snapshot # Multiple instances with additional volume from snapshot
local_action: local_action:
module: ec2 module: ec2
keypair: mykey key_name: mykey
group: webserver group: webserver
instance_type: m1.large instance_type: m1.large
image: ami-6e649707 image: ami-6e649707
@ -303,7 +303,7 @@ local_action:
# VPC example # VPC example
- local_action: - local_action:
module: ec2 module: ec2
keypair: mykey key_name: mykey
group_id: sg-1dc53f72 group_id: sg-1dc53f72
instance_type: m1.small instance_type: m1.small
image: ami-6e649707 image: ami-6e649707
@ -319,14 +319,14 @@ local_action:
hosts: localhost hosts: localhost
gather_facts: False gather_facts: False
vars: vars:
keypair: my_keypair key_name: my_keypair
instance_type: m1.small instance_type: m1.small
security_group: my_securitygroup security_group: my_securitygroup
image: my_ami_id image: my_ami_id
region: us-east-1 region: us-east-1
tasks: tasks:
- name: Launch instance - name: Launch instance
local_action: ec2 keypair={{ keypair }} group={{ security_group }} instance_type={{ instance_type }} image={{ image }} wait=true region={{ region }} local_action: ec2 key_name={{ keypair }} group={{ security_group }} instance_type={{ instance_type }} image={{ image }} wait=true region={{ region }}
register: ec2 register: ec2
- name: Add new instance to host group - name: Add new instance to host group
local_action: add_host hostname={{ item.public_ip }} groupname=launched local_action: add_host hostname={{ item.public_ip }} groupname=launched
@ -403,7 +403,7 @@ local_action:
- local_action: - local_action:
module: ec2 module: ec2
keypair: mykey key_name: mykey
instance_type: c1.medium instance_type: c1.medium
image: emi-40603AD1 image: emi-40603AD1
wait: yes wait: yes
@ -419,7 +419,7 @@ local_action:
- local_action: - local_action:
module: ec2 module: ec2
keypair: mykey key_name: mykey
instance_type: c1.medium instance_type: c1.medium
image: emi-40603AD1 image: emi-40603AD1
wait: yes wait: yes