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

ec2: Fix documentation (#54081)

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2019-03-22 20:08:24 +05:30 committed by Alicia Cozine
parent bafa291af9
commit d241fc7844

View file

@ -29,124 +29,149 @@ version_added: "0.9"
options: options:
key_name: key_name:
description: description:
- key pair to use on the instance - Key pair to use on the instance.
aliases: ['keypair'] aliases: ['keypair']
type: str
id: id:
version_added: "1.1" version_added: "1.1"
description: description:
- identifier for this instance or set of instances, so that the module will be idempotent with respect to EC2 instances. - Identifier for this instance or set of instances, so that the module will be idempotent with respect to EC2 instances.
This identifier is valid for at least 24 hours after the termination of the instance, and should not be reused for another call later on. - This identifier is valid for at least 24 hours after the termination of the instance, and should not be reused for another call later on.
For details, see the description of client token at U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). - For details, see the description of client token at U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html).
type: str
group: group:
description: description:
- security group (or list of groups) to use with the instance. - Security group (or list of groups) to use with the instance.
aliases: [ 'groups' ] aliases: [ 'groups' ]
type: list
group_id: group_id:
version_added: "1.1" version_added: "1.1"
description: description:
- security group id (or list of ids) to use with the instance. - Security group id (or list of ids) to use with the instance.
type: list
region: region:
version_added: "1.2" version_added: "1.2"
description: description:
- The AWS region to use. Must be specified if ec2_url is not used. - The AWS region to use. Must be specified if ec2_url is not used.
If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. - If not specified then the value of the C(AWS_REGION) or C(EC2_REGION) environment variable, if any, is used.
See U(https://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region). - See U(https://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region).
aliases: [ 'aws_region', 'ec2_region' ] aliases: [ 'aws_region', 'ec2_region' ]
type: str
zone: zone:
version_added: "1.2" version_added: "1.2"
description: description:
- AWS availability zone in which to launch the instance. - AWS availability zone in which to launch the instance.
aliases: [ 'aws_zone', 'ec2_zone' ] aliases: [ 'aws_zone', 'ec2_zone' ]
type: str
instance_type: instance_type:
description: description:
- instance type to use for the instance, see U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - Instance type to use for the instance, see U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html).
required: true required: true
type: str
tenancy: tenancy:
version_added: "1.9" version_added: "1.9"
description: description:
- An instance with a tenancy of "dedicated" runs on single-tenant hardware and can only be launched into a VPC. - An instance with a tenancy of "dedicated" runs on single-tenant hardware and can only be launched into a VPC.
Note that to use dedicated tenancy you MUST specify a vpc_subnet_id as well. Dedicated tenancy is not available for EC2 "micro" instances. - Note that to use dedicated tenancy you MUST specify a I(vpc_subnet_id) as well.
- Dedicated tenancy is not available for EC2 "micro" instances.
default: default default: default
choices: [ "default", "dedicated" ] choices: [ "default", "dedicated" ]
type: str
spot_price: spot_price:
version_added: "1.5" version_added: "1.5"
description: description:
- Maximum spot price to bid, If not set a regular on-demand instance is requested. A spot request is made with this maximum bid. - Maximum spot price to bid. If not set, a regular on-demand instance is requested.
When it is filled, the instance is started. - A spot request is made with this maximum bid. When it is filled, the instance is started.
type: str
spot_type: spot_type:
version_added: "2.0" version_added: "2.0"
description: description:
- Type of spot request; one of "one-time" or "persistent". Defaults to "one-time" if not supplied. - Type of spot request; one of "one-time" or "persistent". Defaults to "one-time" if not supplied.
default: "one-time" default: "one-time"
choices: [ "one-time", "persistent" ] choices: [ "one-time", "persistent" ]
type: str
image: image:
description: description:
- I(ami) ID to use for the instance. - I(ami) ID to use for the instance.
required: true required: true
type: str
kernel: kernel:
description: description:
- kernel I(eki) to use for the instance. - Kernel I(eki) to use for the instance.
type: str
ramdisk: ramdisk:
description: description:
- ramdisk I(eri) to use for the instance. - Ramdisk I(eri) to use for the instance.
type: str
wait: wait:
description: description:
- wait for the instance to reach its desired state before returning. Does not wait for SSH, see 'wait_for_connection' example for details. - Wait for the instance to reach its desired state before returning.
- Does not wait for SSH, see 'wait_for_connection' example for details.
type: bool type: bool
default: 'no' default: 'no'
wait_timeout: wait_timeout:
description: description:
- how long before wait gives up, in seconds. - How long before wait gives up, in seconds.
default: 300 default: 300
type: int
spot_wait_timeout: spot_wait_timeout:
version_added: "1.5" version_added: "1.5"
description: description:
- how long to wait for the spot instance request to be fulfilled. - How long to wait for the spot instance request to be fulfilled.
default: 600 default: 600
type: int
count: count:
description: description:
- number of instances to launch. - Number of instances to launch.
default: 1 default: 1
type: int
monitoring: monitoring:
version_added: "1.1" version_added: "1.1"
description: description:
- enable detailed monitoring (CloudWatch) for instance. - Enable detailed monitoring (CloudWatch) for instance.
type: bool type: bool
default: 'no' default: 'no'
user_data: user_data:
version_added: "0.9" version_added: "0.9"
description: description:
- opaque blob of data which is made available to the ec2 instance. - Opaque blob of data which is made available to the EC2 instance.
type: str
instance_tags: instance_tags:
version_added: "1.0" version_added: "1.0"
description: description:
- a hash/dictionary of tags to add to the new instance or for starting/stopping instance by tag; '{"key":"value"}' and '{"key":"value","key":"value"}'. - A hash/dictionary of tags to add to the new instance or for starting/stopping instance by tag; '{"key":"value"}' and '{"key":"value","key":"value"}'.
type: dict
placement_group: placement_group:
version_added: "1.3" version_added: "1.3"
description: description:
- placement group for the instance when using EC2 Clustered Compute. - Placement group for the instance when using EC2 Clustered Compute.
type: str
vpc_subnet_id: vpc_subnet_id:
version_added: "1.1" version_added: "1.1"
description: description:
- the subnet ID in which to launch the instance (VPC). - the subnet ID in which to launch the instance (VPC).
type: str
assign_public_ip: assign_public_ip:
version_added: "1.5" version_added: "1.5"
description: description:
- when provisioning within vpc, assign a public IP address. Boto library must be 2.13.0+. - When provisioning within vpc, assign a public IP address. Boto library must be 2.13.0+.
type: bool type: bool
private_ip: private_ip:
version_added: "1.2" version_added: "1.2"
description: description:
- the private ip address to assign the instance (from the vpc subnet). - The private ip address to assign the instance (from the vpc subnet).
type: str
instance_profile_name: instance_profile_name:
version_added: "1.3" version_added: "1.3"
description: description:
- Name of the IAM instance profile (i.e. what the EC2 console refers to as an "IAM Role") to use. Boto library must be 2.5.0+. - Name of the IAM instance profile (i.e. what the EC2 console refers to as an "IAM Role") to use. Boto library must be 2.5.0+.
type: str
instance_ids: instance_ids:
version_added: "1.3" version_added: "1.3"
description: description:
- "list of instance ids, currently used for states: absent, running, stopped" - "list of instance ids, currently used for states: absent, running, stopped"
aliases: ['instance_id'] aliases: ['instance_id']
type: list
source_dest_check: source_dest_check:
version_added: "1.6" version_added: "1.6"
description: description:
@ -166,6 +191,7 @@ options:
images (which require termination on shutdown). images (which require termination on shutdown).
default: 'stop' default: 'stop'
choices: [ "stop", "terminate" ] choices: [ "stop", "terminate" ]
type: str
state: state:
version_added: "1.3" version_added: "1.3"
description: description:
@ -174,6 +200,7 @@ options:
required: false required: false
default: 'present' default: 'present'
choices: ['present', 'absent', 'running', 'restarted', 'stopped'] choices: ['present', 'absent', 'running', 'restarted', 'stopped']
type: str
volumes: volumes:
version_added: "1.5" version_added: "1.5"
description: description:
@ -181,6 +208,7 @@ options:
are - device_name (str; required), delete_on_termination (bool; False), device_type (deprecated), ephemeral (str), are - device_name (str; required), delete_on_termination (bool; False), device_type (deprecated), ephemeral (str),
encrypted (bool; False), snapshot (str), volume_type (str), volume_size (int, GiB), iops (int) - device_type encrypted (bool; False), snapshot (str), volume_type (str), volume_size (int, GiB), iops (int) - device_type
is deprecated use volume_type, iops must be set when volume_type='io1', ephemeral and snapshot are mutually exclusive. is deprecated use volume_type, iops must be set when volume_type='io1', ephemeral and snapshot are mutually exclusive.
type: list
ebs_optimized: ebs_optimized:
version_added: "1.6" version_added: "1.6"
description: description:
@ -192,6 +220,7 @@ options:
description: description:
- An integer value which indicates how many instances that match the 'count_tag' parameter should be running. - An integer value which indicates how many instances that match the 'count_tag' parameter should be running.
Instances are either created or terminated based on this value. Instances are either created or terminated based on this value.
type: int
count_tag: count_tag:
version_added: "1.5" version_added: "1.5"
description: description:
@ -205,11 +234,12 @@ options:
none of the assign_public_ip, private_ip, vpc_subnet_id, group, or group_id parameters may be used. (Those parameters are none of the assign_public_ip, private_ip, vpc_subnet_id, group, or group_id parameters may be used. (Those parameters are
for creating a new network interface at launch.) for creating a new network interface at launch.)
aliases: ['network_interface'] aliases: ['network_interface']
type: list
spot_launch_group: spot_launch_group:
version_added: "2.1" version_added: "2.1"
description: description:
- Launch group for spot request, see U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-spot-instances-work.html#spot-launch-group). - Launch group for spot request, see U(https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-spot-instances-work.html#spot-launch-group).
type: str
author: author:
- "Tim Gerla (@tgerla)" - "Tim Gerla (@tgerla)"
- "Lester Wade (@lwade)" - "Lester Wade (@lwade)"
@ -1596,8 +1626,8 @@ def main():
monitoring=dict(type='bool', default=False), monitoring=dict(type='bool', default=False),
ramdisk=dict(), ramdisk=dict(),
wait=dict(type='bool', default=False), wait=dict(type='bool', default=False),
wait_timeout=dict(default=300), wait_timeout=dict(type='int', default=300),
spot_wait_timeout=dict(default=600), spot_wait_timeout=dict(type='int', default=600),
placement_group=dict(), placement_group=dict(),
user_data=dict(), user_data=dict(),
instance_tags=dict(type='dict'), instance_tags=dict(type='dict'),