diff --git a/docs/amazon.aws.aws_az_info.rst b/docs/amazon.aws.aws_az_info.rst deleted file mode 100644 index 0b8c4d65d8c..00000000000 --- a/docs/amazon.aws.aws_az_info.rst +++ /dev/null @@ -1,289 +0,0 @@ -:orphan: - -.. _amazon.aws.aws_az_info_module: - - -********************** -amazon.aws.aws_az_info -********************** - -**Gather information about availability zones in AWS.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about availability zones in AWS. -- This module was called :ref:`amazon.aws.aws_az_facts ` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- filters - -
- dictionary -
-
- Default:
{}
-
-
A dict of filters to apply. Each dict item consists of a filter key and a filter value. See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html for possible filters. Filter names and values are case sensitive. You can also use underscores instead of dashes (-) in the filter keys, which will take precedence in case of conflict.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Gather information about all availability zones - amazon.aws.aws_az_info: - - - name: Gather information about a single availability zone - amazon.aws.aws_az_info: - filters: - zone-name: eu-west-1a - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- availability_zones - -
- list -
-
on success -
Availability zones that match the provided filters. Each element consists of a dict with all the information related to that available zone.
-
-
Sample:
-
[ { 'messages': [], 'region_name': 'us-west-1', 'state': 'available', 'zone_name': 'us-west-1b' }, { 'messages': [], 'region_name': 'us-west-1', 'state': 'available', 'zone_name': 'us-west-1c' } ]
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Henrique Rodrigues (@Sodki) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.aws_caller_info.rst b/docs/amazon.aws.aws_caller_info.rst deleted file mode 100644 index 5a61bce90ec..00000000000 --- a/docs/amazon.aws.aws_caller_info.rst +++ /dev/null @@ -1,323 +0,0 @@ -:orphan: - -.. _amazon.aws.aws_caller_info_module: - - -************************** -amazon.aws.aws_caller_info -************************** - -**Get information about the user and account being used to make AWS calls.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module returns information about the account and user / role from which the AWS access tokens originate. -- The primary use of this is to get the account id for templating into ARNs or similar to avoid needing to specify this information in inventory. -- This module was called :ref:`amazon.aws.aws_caller_facts ` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Get the current caller identity information - amazon.aws.aws_caller_info: - register: caller_info - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- account - -
- string -
-
success -
The account id the access credentials are associated with.
-
-
Sample:
-
123456789012
-
-
- account_alias - -
- string -
-
when caller has the iam:ListAccountAliases permission -
The account alias the access credentials are associated with.
-
-
Sample:
-
acme-production
-
-
- arn - -
- string -
-
success -
The arn identifying the user the credentials are associated with.
-
-
Sample:
-
arn:aws:sts::123456789012:federated-user/my-federated-user-name
-
-
- user_id - -
- string -
-
success -
The user id the access credentials are associated with. Note that this may not correspond to - anything you can look up in the case of roles or federated identities.
-
-
Sample:
-
123456789012:my-federated-user-name
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Ed Costello (@orthanc) -- Stijn Dubrul (@sdubrul) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.aws_s3.rst b/docs/amazon.aws.aws_s3.rst deleted file mode 100644 index 7e99496114d..00000000000 --- a/docs/amazon.aws.aws_s3.rst +++ /dev/null @@ -1,795 +0,0 @@ -:orphan: - -.. _amazon.aws.aws_s3_module: - - -***************** -amazon.aws.aws_s3 -***************** - -**manage objects in S3.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module allows the user to manage S3 buckets and the objects within them. Includes support for creating and deleting both objects and buckets, retrieving objects as files or strings and generating download links. This module has a dependency on boto3 and botocore. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- bucket - -
- string - / required
-
- -
Bucket name.
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- dest - -
- path -
-
- -
The destination file path when downloading an object/key with a GET operation.
-
-
- dualstack - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enables Amazon S3 Dual-Stack Endpoints, allowing S3 communications using both IPv4 and IPv6.
-
Requires at least botocore version 1.4.45.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- encrypt - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set for PUT mode, asks for server-side encryption.
-
-
- encryption_kms_key_id - -
- string -
-
- -
KMS key id to use when encrypting objects using encrypting=aws:kms. Ignored if encryption is not aws:kms
-
-
- encryption_mode - -
- string -
-
-
    Choices: -
  • AES256 ←
  • -
  • aws:kms
  • -
-
-
What encryption mode to use if encrypt=true.
-
-
- expiry - -
- integer -
-
- Default:
600
-
-
Time limit (in seconds) for the URL generated and returned by S3/Walrus when performing a mode=put or mode=geturl operation.
-

aliases: expiration
-
-
- headers - -
- dictionary -
-
- -
Custom headers for PUT operation, as a dictionary of 'key=value' and 'key=value,key=value'.
-
-
- ignore_nonexistent_bucket - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Overrides initial bucket lookups in case bucket or iam policies are restrictive. Example: a user may have the GetObject permission but no other permissions. In this case using the option mode: get will fail without specifying ignore_nonexistent_bucket=true.
-
-
- marker - -
- string -
-
- -
Specifies the key to start with when using list mode. Object keys are returned in alphabetical order, starting with key after the marker in order.
-
-
- max_keys - -
- integer -
-
- Default:
1000
-
-
Max number of results to return in list mode, set this if you want to retrieve fewer than the default 1000 keys.
-
-
- metadata - -
- dictionary -
-
- -
Metadata for PUT operation, as a dictionary of 'key=value' and 'key=value,key=value'.
-
-
- mode - -
- string - / required
-
-
    Choices: -
  • get
  • -
  • put
  • -
  • delete
  • -
  • create
  • -
  • geturl
  • -
  • getstr
  • -
  • delobj
  • -
  • list
  • -
-
-
Switches the module behaviour between put (upload), get (download), geturl (return download url, Ansible 1.3+), getstr (download object as string (1.3+)), list (list keys, Ansible 2.0+), create (bucket), delete (bucket), and delobj (delete object, Ansible 2.0+).
-
-
- object - -
- string -
-
- -
Keyname of the object inside the bucket. Can be used to create "virtual directories", see examples.
-
-
- overwrite - -
- string -
-
- Default:
"always"
-
-
Force overwrite either locally on the filesystem or remotely with the object/key. Used with PUT and GET operations. Boolean or one of [always, never, different], true is equal to 'always' and false is equal to 'never', new in 2.0. When this is set to 'different', the md5 sum of the local file is compared with the 'ETag' of the object/key in S3. The ETag may or may not be an MD5 digest of the object data. See the ETag response header here https://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonResponseHeaders.html
-

aliases: force
-
-
- permission - -
- list - / elements=string
-
- Default:
["private"]
-
-
This option lets the user set the canned permissions on the object/bucket that are created. The permissions that can be set are private, public-read, public-read-write, authenticated-read for a bucket or private, public-read, public-read-write, aws-exec-read, authenticated-read, bucket-owner-read, bucket-owner-full-control for an object. Multiple permissions can be specified as a list.
-
-
- prefix - -
- string -
-
- Default:
""
-
-
Limits the response to keys that begin with the specified prefix for list mode.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- retries - -
- integer -
-
- Default:
0
-
-
On recoverable failure, how many times to retry before actually failing.
-

aliases: retry
-
-
- rgw - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable Ceph RGW S3 support. This option requires an explicit url via s3_url.
-
-
- s3_url - -
- string -
-
- -
S3 URL endpoint for usage with Ceph, Eucalyptus and fakes3 etc. Otherwise assumes AWS.
-

aliases: S3_URL
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- src - -
- string -
-
- -
The source file path when performing a PUT operation.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- version - -
- string -
-
- -
Version ID of the object inside the bucket. Can be used to get a specific version of a file if versioning is enabled in the target bucket.
-
-
- - -Notes ------ - -.. note:: - - In 2.4, this module has been renamed from ``s3`` into :ref:`aws_s3 `. - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - - name: Simple PUT operation - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - src: /usr/local/myfile.txt - mode: put - - - name: Simple PUT operation in Ceph RGW S3 - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - src: /usr/local/myfile.txt - mode: put - rgw: true - s3_url: "http://localhost:8000" - - - name: Simple GET operation - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - dest: /usr/local/myfile.txt - mode: get - - - name: Get a specific version of an object. - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - version: 48c9ee5131af7a716edc22df9772aa6f - dest: /usr/local/myfile.txt - mode: get - - - name: PUT/upload with metadata - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - src: /usr/local/myfile.txt - mode: put - metadata: 'Content-Encoding=gzip,Cache-Control=no-cache' - - - name: PUT/upload with custom headers - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - src: /usr/local/myfile.txt - mode: put - headers: 'x-amz-grant-full-control=emailAddress=owner@example.com' - - - name: List keys simple - amazon.aws.aws_s3: - bucket: mybucket - mode: list - - - name: List keys all options - amazon.aws.aws_s3: - bucket: mybucket - mode: list - prefix: /my/desired/ - marker: /my/desired/0023.txt - max_keys: 472 - - - name: Create an empty bucket - amazon.aws.aws_s3: - bucket: mybucket - mode: create - permission: public-read - - - name: Create a bucket with key as directory, in the EU region - amazon.aws.aws_s3: - bucket: mybucket - object: /my/directory/path - mode: create - region: eu-west-1 - - - name: Delete a bucket and all contents - amazon.aws.aws_s3: - bucket: mybucket - mode: delete - - - name: GET an object but don't download if the file checksums match. New in 2.0 - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - dest: /usr/local/myfile.txt - mode: get - overwrite: different - - - name: Delete an object from a bucket - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - mode: delobj - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- contents - -
- string -
-
(for getstr operation) -
Contents of the object as string.
-
-
Sample:
-
Hello, world!
-
-
- expiry - -
- integer -
-
(for geturl operation) -
Number of seconds the presigned url is valid for.
-
-
Sample:
-
600
-
-
- msg - -
- string -
-
always -
Message indicating the status of the operation.
-
-
Sample:
-
PUT operation complete
-
-
- s3_keys - -
- list - / elements=string
-
(for list operation) -
List of object keys.
-
-
Sample:
-
['prefix1/', 'prefix1/key1', 'prefix1/key2']
-
-
- url - -
- string -
-
(for put and geturl operations) -
URL of the object.
-
-
Sample:
-
https://my-bucket.s3.amazonaws.com/my-key.txt?AWSAccessKeyId=<access-key>&Expires=1506888865&Signature=<signature>
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Lester Wade (@lwade) -- Sloane Hertel (@s-hertel) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.cloudformation.rst b/docs/amazon.aws.cloudformation.rst deleted file mode 100644 index 0f969ddff99..00000000000 --- a/docs/amazon.aws.cloudformation.rst +++ /dev/null @@ -1,817 +0,0 @@ -:orphan: - -.. _amazon.aws.cloudformation_module: - - -************************* -amazon.aws.cloudformation -************************* - -**Create or delete an AWS CloudFormation stack** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Launches or updates an AWS CloudFormation stack and waits for it complete. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore>=1.5.45 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- backoff_delay - -
- integer -
-
- Default:
3
-
-
Number of seconds to wait for the next retry.
-
-
- backoff_max_delay - -
- integer -
-
- Default:
30
-
-
Maximum amount of time to wait between retries.
-
-
- backoff_retries - -
- integer -
-
- Default:
10
-
-
Number of times to retry operation.
-
AWS API throttling mechanism fails CloudFormation module so we have to retry a couple of times.
-
-
- capabilities - -
- list - / elements=string
-
- Default:
["CAPABILITY_IAM", "CAPABILITY_NAMED_IAM"]
-
-
Specify capabilities that stack template contains.
-
Valid values are CAPABILITY_IAM, CAPABILITY_NAMED_IAM and CAPABILITY_AUTO_EXPAND.
-
-
- changeset_name - -
- string -
-
- -
Name given to the changeset when creating a changeset.
-
Only used when create_changeset=true.
-
By default a name prefixed with Ansible-STACKNAME is generated based on input parameters. See the AWS Change Sets docs for more information https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets.html
-
-
- create_changeset - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If stack already exists create a changeset instead of directly applying changes. See the AWS Change Sets docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks-changesets.html.
-
WARNING: if the stack does not exist, it will be created without changeset. If state=absent, the stack will be deleted immediately with no changeset.
-
-
- create_timeout - -
- integer -
-
- -
The amount of time (in minutes) that can pass before the stack status becomes CREATE_FAILED
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- disable_rollback - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
If a stacks fails to form, rollback will remove the stack.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- events_limit - -
- integer -
-
- Default:
200
-
-
Maximum number of CloudFormation events to fetch from a stack when creating or updating it.
-
-
- notification_arns - -
- string -
-
- -
A comma separated list of Simple Notification Service (SNS) topic ARNs to publish stack related events.
-
-
- on_create_failure - -
- string -
-
-
    Choices: -
  • DO_NOTHING
  • -
  • ROLLBACK
  • -
  • DELETE
  • -
-
-
Action to take upon failure of stack creation. Incompatible with the disable_rollback option.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- role_arn - -
- string -
-
- -
The role that AWS CloudFormation assumes to create the stack. See the AWS CloudFormation Service Role docs https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-iam-servicerole.html
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- stack_name - -
- string - / required
-
- -
Name of the CloudFormation stack.
-
-
- stack_policy - -
- string -
-
- -
The path of the CloudFormation stack policy. A policy cannot be removed once placed, but it can be modified. for instance, allow all updates https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack-resources.html#d0e9051
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
If state=present, stack will be created.
-
If state=present and if stack exists and template has changed, it will be updated.
-
If state=absent, stack will be removed.
-
-
- tags - -
- dictionary -
-
- -
Dictionary of tags to associate with stack and its resources during stack creation.
-
Can be updated later, updating tags removes previous entries.
-
-
- template - -
- path -
-
- -
The local path of the CloudFormation template.
-
This must be the full path to the file, relative to the working directory. If using roles this may look like roles/cloudformation/files/cloudformation-example.json.
-
If state=present and the stack does not exist yet, either template, template_body or template_url must be specified (but only one of them).
-
If state=present, the stack does exist, and neither template, template_body nor template_url are specified, the previous template will be reused.
-
-
- template_body - -
- string -
-
- -
Template body. Use this to pass in the actual body of the CloudFormation template.
-
If state=present and the stack does not exist yet, either template, template_body or template_url must be specified (but only one of them).
-
If state=present, the stack does exist, and neither template, template_body nor template_url are specified, the previous template will be reused.
-
-
- template_format - -
- string -
-
- -
This parameter is ignored since Ansible 2.3 and will be removed after 2022-06-01.
-
Templates are now passed raw to CloudFormation regardless of format.
-
-
- template_parameters - -
- dictionary -
-
- Default:
{}
-
-
A list of hashes of all the template variables for the stack. The value can be a string or a dict.
-
Dict can be used to set additional template parameter attributes like UsePreviousValue (see example).
-
-
- template_url - -
- string -
-
- -
Location of file containing the template body. The URL must point to a template (max size 307,200 bytes) located in an S3 bucket in the same region as the stack.
-
If state=present and the stack does not exist yet, either template, template_body or template_url must be specified (but only one of them).
-
If state=present, the stack does exist, and neither template, template_body nor template_url are specified, the previous template will be reused.
-
-
- termination_protection - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable or disable termination protection on the stack. Only works with botocore >= 1.7.18.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - CloudFormation features change often, and this module tries to keep up. That means your botocore version should be fresh. The version listed in the requirements is the oldest version that works with the module as a whole. Some features may require recent versions, and we do not pinpoint a minimum version for each feature. Instead of relying on the minimum version, keep botocore up to date. AWS is always releasing features and fixing bugs. - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - - name: create a cloudformation stack - amazon.aws.cloudformation: - stack_name: "ansible-cloudformation" - state: "present" - region: "us-east-1" - disable_rollback: true - template: "files/cloudformation-example.json" - template_parameters: - KeyName: "jmartin" - DiskType: "ephemeral" - InstanceType: "m1.small" - ClusterSize: 3 - tags: - Stack: "ansible-cloudformation" - - # Basic role example - - name: create a stack, specify role that cloudformation assumes - amazon.aws.cloudformation: - stack_name: "ansible-cloudformation" - state: "present" - region: "us-east-1" - disable_rollback: true - template: "roles/cloudformation/files/cloudformation-example.json" - role_arn: 'arn:aws:iam::123456789012:role/cloudformation-iam-role' - - - name: delete a stack - amazon.aws.cloudformation: - stack_name: "ansible-cloudformation-old" - state: "absent" - - # Create a stack, pass in template from a URL, disable rollback if stack creation fails, - # pass in some parameters to the template, provide tags for resources created - - name: create a stack, pass in the template via an URL - amazon.aws.cloudformation: - stack_name: "ansible-cloudformation" - state: present - region: us-east-1 - disable_rollback: true - template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template - template_parameters: - KeyName: jmartin - DiskType: ephemeral - InstanceType: m1.small - ClusterSize: 3 - tags: - Stack: ansible-cloudformation - - # Create a stack, passing in template body using lookup of Jinja2 template, disable rollback if stack creation fails, - # pass in some parameters to the template, provide tags for resources created - - name: create a stack, pass in the template body via lookup template - amazon.aws.cloudformation: - stack_name: "ansible-cloudformation" - state: present - region: us-east-1 - disable_rollback: true - template_body: "{{ lookup('template', 'cloudformation.j2') }}" - template_parameters: - KeyName: jmartin - DiskType: ephemeral - InstanceType: m1.small - ClusterSize: 3 - tags: - Stack: ansible-cloudformation - - # Pass a template parameter which uses CloudFormation's UsePreviousValue attribute - # When use_previous_value is set to True, the given value will be ignored and - # CloudFormation will use the value from a previously submitted template. - # If use_previous_value is set to False (default) the given value is used. - - amazon.aws.cloudformation: - stack_name: "ansible-cloudformation" - state: "present" - region: "us-east-1" - template: "files/cloudformation-example.json" - template_parameters: - DBSnapshotIdentifier: - use_previous_value: True - value: arn:aws:rds:es-east-1:000000000000:snapshot:rds:my-db-snapshot - DBName: - use_previous_value: True - tags: - Stack: "ansible-cloudformation" - - # Enable termination protection on a stack. - # If the stack already exists, this will update its termination protection - - name: enable termination protection during stack creation - amazon.aws.cloudformation: - stack_name: my_stack - state: present - template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template - termination_protection: yes - - # Configure TimeoutInMinutes before the stack status becomes CREATE_FAILED - # In this case, if disable_rollback is not set or is set to false, the stack will be rolled back. - - name: enable termination protection during stack creation - amazon.aws.cloudformation: - stack_name: my_stack - state: present - template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template - create_timeout: 5 - - # Configure rollback behaviour on the unsuccessful creation of a stack allowing - # CloudFormation to clean up, or do nothing in the event of an unsuccessful - # deployment - # In this case, if on_create_failure is set to "DELETE", it will clean up the stack if - # it fails to create - - name: create stack which will delete on creation failure - amazon.aws.cloudformation: - stack_name: my_stack - state: present - template_url: https://s3.amazonaws.com/my-bucket/cloudformation.template - on_create_failure: DELETE - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- change_set_id - -
- string -
-
state=present and create_changeset=true -
The ID of the stack change set if one was created
-
-
Sample:
-
arn:aws:cloudformation:us-east-1:012345678901:changeSet/Ansible-StackName-f4496805bd1b2be824d1e315c6884247ede41eb0
-
-
- events - -
- list -
-
always -
Most recent events in CloudFormation's event log. This may be from a previous run in some cases.
-
-
Sample:
-
['StackEvent AWS::CloudFormation::Stack stackname UPDATE_COMPLETE', 'StackEvent AWS::CloudFormation::Stack stackname UPDATE_COMPLETE_CLEANUP_IN_PROGRESS']
-
-
- log - -
- list -
-
always -
Debugging logs. Useful when modifying or finding an error.
-
-
Sample:
-
['updating stack']
-
-
- stack_outputs - -
- dictionary -
-
state == present -
A key:value dictionary of all the stack outputs currently defined. If there are no stack outputs, it is an empty dictionary.
-
-
Sample:
-
{'MySg': 'AnsibleModuleTestYAML-CFTestSg-C8UVS567B6NS'}
-
-
- stack_resources - -
- list -
-
state == present -
AWS stack resources and their status. List of dictionaries, one dict per resource.
-
-
Sample:
-
[{'last_updated_time': '2016-10-11T19:40:14.979000+00:00', 'logical_resource_id': 'CFTestSg', 'physical_resource_id': 'cloudformation2-CFTestSg-16UQ4CYQ57O9F', 'resource_type': 'AWS::EC2::SecurityGroup', 'status': 'UPDATE_COMPLETE', 'status_reason': None}]
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- James S. Martin (@jsmartin) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.cloudformation_info.rst b/docs/amazon.aws.cloudformation_info.rst deleted file mode 100644 index f6ca50813c9..00000000000 --- a/docs/amazon.aws.cloudformation_info.rst +++ /dev/null @@ -1,565 +0,0 @@ -:orphan: - -.. _amazon.aws.cloudformation_info_module: - - -****************************** -amazon.aws.cloudformation_info -****************************** - -**Obtain information about an AWS CloudFormation stack** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gets information about an AWS CloudFormation stack. -- This module was called ``amazon.aws.cloudformation_facts`` before Ansible 2.9, returning ``ansible_facts``. Note that the :ref:`amazon.aws.cloudformation_info ` module no longer returns ``ansible_facts``! - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 >= 1.0.0 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- all_facts - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Get all stack information for the stack.
-
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- stack_change_sets - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Get stack change sets for the stack
-
-
- stack_events - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Get stack events for the stack.
-
-
- stack_name - -
- string -
-
- -
The name or id of the CloudFormation stack. Gathers information on all stacks by default.
-
-
- stack_policy - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Get stack policy for the stack.
-
-
- stack_resources - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Get stack resources for the stack.
-
-
- stack_template - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Get stack template body for the stack.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Get summary information about a stack - amazon.aws.cloudformation_info: - stack_name: my-cloudformation-stack - register: output - - - debug: - msg: "{{ output['cloudformation']['my-cloudformation-stack'] }}" - - # When the module is called as cloudformation_facts, return values are published - # in ansible_facts['cloudformation'][] and can be used as follows. - # Note that this is deprecated and will stop working in Ansible after 2021-12-01. - - - amazon.aws.cloudformation_facts: - stack_name: my-cloudformation-stack - - - debug: - msg: "{{ ansible_facts['cloudformation']['my-cloudformation-stack'] }}" - - # Get stack outputs, when you have the stack name available as a fact - - set_fact: - stack_name: my-awesome-stack - - - amazon.aws.cloudformation_info: - stack_name: "{{ stack_name }}" - register: my_stack - - - debug: - msg: "{{ my_stack.cloudformation[stack_name].stack_outputs }}" - - # Get all stack information about a stack - - amazon.aws.cloudformation_info: - stack_name: my-cloudformation-stack - all_facts: true - - # Get stack resource and stack policy information about a stack - - amazon.aws.cloudformation_info: - stack_name: my-cloudformation-stack - stack_resources: true - stack_policy: true - - # Fail if the stack doesn't exist - - name: try to get facts about a stack but fail if it doesn't exist - amazon.aws.cloudformation_info: - stack_name: nonexistent-stack - all_facts: yes - failed_when: cloudformation['nonexistent-stack'] is undefined - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- stack_change_sets - -
- list -
-
only if all_facts or stack_change_sets is true and the stack exists -
A list of stack change sets. Each item in the list represents the details of a specific changeset
-
-
-
- stack_description - -
- dictionary -
-
if the stack exists -
Summary facts about the stack
-
-
-
- stack_events - -
- list -
-
only if all_facts or stack_events is true and the stack exists -
All stack events for the stack
-
-
-
- stack_outputs - -
- dictionary -
-
if the stack exists -
Dictionary of stack outputs keyed by the value of each output 'OutputKey' parameter and corresponding value of each output 'OutputValue' parameter
-
-
Sample:
-
{'ApplicationDatabaseName': 'dazvlpr01xj55a.ap-southeast-2.rds.amazonaws.com'}
-
-
- stack_parameters - -
- dictionary -
-
if the stack exists -
Dictionary of stack parameters keyed by the value of each parameter 'ParameterKey' parameter and corresponding value of each parameter 'ParameterValue' parameter
-
-
Sample:
-
{'DatabaseEngine': 'mysql', 'DatabasePassword': '***'}
-
-
- stack_policy - -
- dictionary -
-
only if all_facts or stack_policy is true and the stack exists -
Describes the stack policy for the stack
-
-
-
- stack_resource_list - -
- list -
-
only if all_facts or stack_resourses is true and the stack exists -
Describes stack resources for the stack
-
-
-
- stack_resources - -
- dictionary -
-
only if all_facts or stack_resourses is true and the stack exists -
Dictionary of stack resources keyed by the value of each resource 'LogicalResourceId' parameter and corresponding value of each resource 'PhysicalResourceId' parameter
-
-
Sample:
-
{'AutoScalingGroup': 'dev-someapp-AutoscalingGroup-1SKEXXBCAN0S7', 'AutoScalingSecurityGroup': 'sg-abcd1234', 'ApplicationDatabase': 'dazvlpr01xj55a'}
-
-
- stack_template - -
- dictionary -
-
only if all_facts or stack_template is true and the stack exists -
Describes the stack template for the stack
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Justin Menga (@jmenga) -- Kevin Coming (@waffie1) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2.rst b/docs/amazon.aws.ec2.rst deleted file mode 100644 index 72e471fce29..00000000000 --- a/docs/amazon.aws.ec2.rst +++ /dev/null @@ -1,1279 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_module: - - -************** -amazon.aws.ec2 -************** - -**create, terminate, start or stop an instance in ec2** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates or terminates ec2 instances. -- Note: This module uses the older boto Python module to interact with the EC2 API. :ref:`ec2 ` will still receive bug fixes, but no new features. Consider using the :ref:`ec2_instance ` module instead. If :ref:`ec2_instance ` does not support a feature you need that is available in :ref:`ec2 `, please file a feature request. - - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 2.6 -- boto - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- assign_public_ip - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
When provisioning within vpc, assign a public IP address. Boto library must be 2.13.0+.
-
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- count - -
- integer -
-
- Default:
1
-
-
Number of instances to launch.
-
-
- count_tag - -
- raw -
-
- -
Used with exact_count to determine how many nodes based on a specific tag criteria should be running. This can be expressed in multiple ways and is shown in the EXAMPLES section. For instance, one can request 25 servers that are tagged with "class=webserver". The specified tag must already exist or be passed in as the instance_tags option.
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ebs_optimized - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether instance is using optimized EBS volumes, see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- exact_count - -
- integer -
-
- -
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.
-
-
- group - -
- list - / elements=string
-
- -
Security group (or list of groups) to use with the instance.
-

aliases: groups
-
-
- group_id - -
- list - / elements=string
-
- -
Security group id (or list of ids) to use with the instance.
-
-
- id - -
- string -
-
- -
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.
- -
-
- image - -
- string -
-
- -
ami ID to use for the instance.
-
Required when state=present.
-
-
- instance_ids - -
- list - / elements=string
-
- -
list of instance ids, currently used for states: absent, running, stopped
-

aliases: instance_id
-
-
- instance_initiated_shutdown_behavior - -
- string -
-
-
    Choices: -
  • stop ←
  • -
  • terminate
  • -
-
-
Set whether AWS will Stop or Terminate an instance on shutdown. This parameter is ignored when using instance-store. images (which require termination on shutdown).
-
-
- instance_profile_name - -
- string -
-
- -
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+.
-
-
- instance_tags - -
- dictionary -
-
- -
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"}'.
-
-
- instance_type - -
- string -
-
- - -
Required when creating a new instance.
-

aliases: type
-
-
- kernel - -
- string -
-
- -
Kernel eki to use for the instance.
-
-
- key_name - -
- string -
-
- -
Key pair to use on the instance.
-
The SSH key must already exist in AWS in order to use this argument.
-
Keys can be created / deleted using the ec2_key module.
-

aliases: keypair
-
-
- monitoring - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable detailed monitoring (CloudWatch) for instance.
-
-
- network_interfaces - -
- list - / elements=string
-
- -
A list of existing network interfaces to attach to the instance at launch. When specifying existing network interfaces, 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.)
-

aliases: network_interface
-
-
- placement_group - -
- string -
-
- -
Placement group for the instance when using EC2 Clustered Compute.
-
-
- private_ip - -
- string -
-
- -
The private ip address to assign the instance (from the vpc subnet).
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- ramdisk - -
- string -
-
- -
Ramdisk eri to use for the instance.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- source_dest_check - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable or Disable the Source/Destination checks (for NAT instances and Virtual Routers). When initially creating an instance the EC2 API defaults this to True.
-
-
- spot_launch_group - -
- string -
-
- - -
-
- spot_price - -
- string -
-
- -
Maximum spot price to bid. If not set, a regular on-demand instance is requested.
-
A spot request is made with this maximum bid. When it is filled, the instance is started.
-
-
- spot_type - -
- string -
-
-
    Choices: -
  • one-time ←
  • -
  • persistent
  • -
-
-
The type of spot request.
-
After being interrupted a persistent spot instance will be started once there is capacity to fill the request again.
-
-
- spot_wait_timeout - -
- integer -
-
- Default:
600
-
-
How long to wait for the spot instance request to be fulfilled. Affects 'Request valid until' for setting spot request lifespan.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
  • restarted
  • -
  • running
  • -
  • stopped
  • -
-
-
Create, terminate, start, stop or restart instances. The state 'restarted' was added in Ansible 2.2.
-
When state=absent, instance_ids is required.
-
When state=running, state=stopped or state=restarted then either instance_ids or instance_tags is required.
-
-
- tenancy - -
- string -
-
-
    Choices: -
  • default ←
  • -
  • dedicated
  • -
-
-
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.
-
-
- termination_protection - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable or Disable the Termination Protection.
-
-
- user_data - -
- string -
-
- -
Opaque blob of data which is made available to the EC2 instance.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- volumes - -
- list - / elements=dictionary
-
- -
A list of hash/dictionaries of volumes to add to the new instance.
-
-
- delete_on_termination - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether the volume should be automatically deleted when the instance is terminated.
-
-
- device_name - -
- string - / required
-
- -
A name for the device (For example /dev/sda).
-
-
- encrypted - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether the volume should be encrypted using the 'aws/ebs' KMS CMK.
-
-
- ephemeral - -
- string -
-
- -
Whether the volume should be ephemeral.
-
Data on ephemeral volumes is lost when the instance is stopped.
-
Mutually exclusive with the snapshot parameter.
-
-
- iops - -
- integer -
-
- -
The number of IOPS per second to provision for the volume.
-
Required when volume_type=io1.
-
-
- snapshot - -
- string -
-
- -
The ID of an EBS snapshot to copy when creating the volume.
-
Mutually exclusive with the ephemeral parameter.
-
-
- volume_size - -
- integer -
-
- -
The size of the volume (in GiB).
-
-
- volume_type - -
- string -
-
- -
The type of volume to create.
-
See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html for more information on the available volume types.
-
-
- vpc_subnet_id - -
- string -
-
- -
the subnet ID in which to launch the instance (VPC).
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Wait for the instance to reach its desired state before returning.
-
Does not wait for SSH, see the 'wait_for_connection' example for details.
-
-
- wait_timeout - -
- integer -
-
- Default:
300
-
-
How long before wait gives up, in seconds.
-
-
- zone - -
- string -
-
- -
AWS availability zone in which to launch the instance.
-

aliases: aws_zone, ec2_zone
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Basic provisioning example - - amazon.aws.ec2: - key_name: mykey - instance_type: t2.micro - image: ami-123456 - wait: yes - group: webserver - count: 3 - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - - # Advanced example with tagging and CloudWatch - - amazon.aws.ec2: - key_name: mykey - group: databases - instance_type: t2.micro - image: ami-123456 - wait: yes - wait_timeout: 500 - count: 5 - instance_tags: - db: postgres - monitoring: yes - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - - # Single instance with additional IOPS volume from snapshot and volume delete on termination - - amazon.aws.ec2: - key_name: mykey - group: webserver - instance_type: c3.medium - image: ami-123456 - wait: yes - wait_timeout: 500 - volumes: - - device_name: /dev/sdb - snapshot: snap-abcdef12 - volume_type: io1 - iops: 1000 - volume_size: 100 - delete_on_termination: true - monitoring: yes - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - - # Single instance with ssd gp2 root volume - - amazon.aws.ec2: - key_name: mykey - group: webserver - instance_type: c3.medium - image: ami-123456 - wait: yes - wait_timeout: 500 - volumes: - - device_name: /dev/xvda - volume_type: gp2 - volume_size: 8 - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - count_tag: - Name: dbserver - exact_count: 1 - - # Multiple groups example - - amazon.aws.ec2: - key_name: mykey - group: ['databases', 'internal-services', 'sshable', 'and-so-forth'] - instance_type: m1.large - image: ami-6e649707 - wait: yes - wait_timeout: 500 - count: 5 - instance_tags: - db: postgres - monitoring: yes - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - - # Multiple instances with additional volume from snapshot - - amazon.aws.ec2: - key_name: mykey - group: webserver - instance_type: m1.large - image: ami-6e649707 - wait: yes - wait_timeout: 500 - count: 5 - volumes: - - device_name: /dev/sdb - snapshot: snap-abcdef12 - volume_size: 10 - monitoring: yes - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - - # Dedicated tenancy example - - amazon.aws.ec2: - assign_public_ip: yes - group_id: sg-1dc53f72 - key_name: mykey - image: ami-6e649707 - instance_type: m1.small - tenancy: dedicated - vpc_subnet_id: subnet-29e63245 - wait: yes - - # Spot instance example - - amazon.aws.ec2: - spot_price: 0.24 - spot_wait_timeout: 600 - keypair: mykey - group_id: sg-1dc53f72 - instance_type: m1.small - image: ami-6e649707 - wait: yes - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - spot_launch_group: report_generators - instance_initiated_shutdown_behavior: terminate - - # Examples using pre-existing network interfaces - - amazon.aws.ec2: - key_name: mykey - instance_type: t2.small - image: ami-f005ba11 - network_interface: eni-deadbeef - - - amazon.aws.ec2: - key_name: mykey - instance_type: t2.small - image: ami-f005ba11 - network_interfaces: ['eni-deadbeef', 'eni-5ca1ab1e'] - - # Launch instances, runs some tasks - # and then terminate them - - - name: Create a sandbox instance - hosts: localhost - gather_facts: False - vars: - keypair: my_keypair - instance_type: m1.small - security_group: my_securitygroup - image: my_ami_id - region: us-east-1 - tasks: - - name: Launch instance - amazon.aws.ec2: - key_name: "{{ keypair }}" - group: "{{ security_group }}" - instance_type: "{{ instance_type }}" - image: "{{ image }}" - wait: true - region: "{{ region }}" - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - register: ec2 - - - name: Add new instance to host group - add_host: - hostname: "{{ item.public_ip }}" - groupname: launched - loop: "{{ ec2.instances }}" - - - name: Wait for SSH to come up - delegate_to: "{{ item.public_dns_name }}" - wait_for_connection: - delay: 60 - timeout: 320 - loop: "{{ ec2.instances }}" - - - name: Configure instance(s) - hosts: launched - become: True - gather_facts: True - roles: - - my_awesome_role - - my_awesome_test - - - name: Terminate instances - hosts: localhost - tasks: - - name: Terminate instances that were previously launched - amazon.aws.ec2: - state: 'absent' - instance_ids: '{{ ec2.instance_ids }}' - - # Start a few existing instances, run some tasks - # and stop the instances - - - name: Start sandbox instances - hosts: localhost - gather_facts: false - vars: - instance_ids: - - 'i-xxxxxx' - - 'i-xxxxxx' - - 'i-xxxxxx' - region: us-east-1 - tasks: - - name: Start the sandbox instances - amazon.aws.ec2: - instance_ids: '{{ instance_ids }}' - region: '{{ region }}' - state: running - wait: True - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - roles: - - do_neat_stuff - - do_more_neat_stuff - - - name: Stop sandbox instances - hosts: localhost - gather_facts: false - vars: - instance_ids: - - 'i-xxxxxx' - - 'i-xxxxxx' - - 'i-xxxxxx' - region: us-east-1 - tasks: - - name: Stop the sandbox instances - amazon.aws.ec2: - instance_ids: '{{ instance_ids }}' - region: '{{ region }}' - state: stopped - wait: True - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - - # - # Start stopped instances specified by tag - # - - amazon.aws.ec2: - instance_tags: - Name: ExtraPower - state: running - - # - # Restart instances specified by tag - # - - amazon.aws.ec2: - instance_tags: - Name: ExtraPower - state: restarted - - # - # Enforce that 5 instances with a tag "foo" are running - # (Highly recommended!) - # - - - amazon.aws.ec2: - key_name: mykey - instance_type: c1.medium - image: ami-40603AD1 - wait: yes - group: webserver - instance_tags: - foo: bar - exact_count: 5 - count_tag: foo - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - - # - # Enforce that 5 running instances named "database" with a "dbtype" of "postgres" - # - - - amazon.aws.ec2: - key_name: mykey - instance_type: c1.medium - image: ami-40603AD1 - wait: yes - group: webserver - instance_tags: - Name: database - dbtype: postgres - exact_count: 5 - count_tag: - Name: database - dbtype: postgres - vpc_subnet_id: subnet-29e63245 - assign_public_ip: yes - - # - # count_tag complex argument examples - # - - # instances with tag foo - - amazon.aws.ec2: - count_tag: - foo: - - # instances with tag foo=bar - - amazon.aws.ec2: - count_tag: - foo: bar - - # instances with tags foo=bar & baz - - amazon.aws.ec2: - count_tag: - foo: bar - baz: - - # instances with tags foo & bar & baz=bang - - amazon.aws.ec2: - count_tag: - - foo - - bar - - baz: bang - - - - - - -Status ------- - - -Authors -~~~~~~~ - -- Tim Gerla (@tgerla) -- Lester Wade (@lwade) -- Seth Vidal (@skvidal) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_ami.rst b/docs/amazon.aws.ec2_ami.rst deleted file mode 100644 index 994ac986b06..00000000000 --- a/docs/amazon.aws.ec2_ami.rst +++ /dev/null @@ -1,1131 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_ami_module: - - -****************** -amazon.aws.ec2_ami -****************** - -**Create or destroy an image (AMI) in ec2** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Registers or deregisters ec2 images. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 2.6 -- boto - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- architecture - -
- string -
-
- Default:
"x86_64"
-
-
The target architecture of the image to register
-
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- billing_products - -
- list - / elements=string
-
- -
A list of valid billing codes. To be used with valid accounts by aws marketplace vendors.
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- delete_snapshot - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Delete snapshots when deregistering the AMI.
-
-
- description - -
- string -
-
- -
Human-readable string describing the contents and purpose of the AMI.
-
-
- device_mapping - -
- list - / elements=dictionary
-
- -
List of device hashes/dictionaries with custom configurations (same block-device-mapping parameters).
-
-
- delete_on_termination - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether the device should be automatically deleted when the Instance is terminated.
-
-
- device_name - -
- string -
-
- -
The device name. For example /dev/sda.
-
-
- encrypted - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether the volume should be encrypted.
-
-
- iops - -
- integer -
-
- -
When using an io1 volume_type this sets the number of IOPS provisioned for the volume
-
-
- no_device - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Suppresses the specified device included in the block device mapping of the AMI.
-
-
- snapshot_id - -
- string -
-
- -
The ID of the Snapshot.
-
-
- volume_size - -
- integer -
-
- -
The size of the volume (in GiB)
-

aliases: size
-
-
- volume_type - -
- string -
-
- -
The volume type. Defaults to gp2 when not set.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- enhanced_networking - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
A boolean representing whether enhanced networking with ENA is enabled or not.
-
-
- image_id - -
- string -
-
- -
Image ID to be deregistered.
-
-
- image_location - -
- string -
-
- -
The s3 location of an image to use for the AMI.
-
-
- instance_id - -
- string -
-
- -
Instance ID to create the AMI from.
-
-
- kernel_id - -
- string -
-
- -
The target kernel id of the image to register.
-
-
- launch_permissions - -
- dictionary -
-
- -
Users and groups that should be able to launch the AMI. Expects dictionary with a key of user_ids and/or group_names. user_ids should be a list of account ids. group_name should be a list of groups, "all" is the only acceptable value currently.
-
You must pass all desired launch permissions if you wish to modify existing launch permissions (passing just groups will remove all users)
-
-
- name - -
- string -
-
- -
The name of the new AMI.
-
-
- no_reboot - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Flag indicating that the bundling process should not attempt to shutdown the instance before bundling. If this flag is True, the responsibility of maintaining file system integrity is left to the owner of the instance.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- purge_tags - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to remove existing tags that aren't passed in the tags parameter
-
-
- ramdisk_id - -
- string -
-
- -
The ID of the RAM disk.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- root_device_name - -
- string -
-
- -
The root device name of the image to register.
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- sriov_net_support - -
- string -
-
- -
Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Register or deregister an AMI.
-
-
- tags - -
- dictionary -
-
- -
A dictionary of tags to add to the new image; '{"key":"value"}' and '{"key":"value","key":"value"}'
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- virtualization_type - -
- string -
-
- Default:
"hvm"
-
-
The virtualization type of the image to register.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Wait for the AMI to be in state 'available' before returning.
-
-
- wait_timeout - -
- integer -
-
- Default:
900
-
-
How long before wait gives up, in seconds.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Basic AMI Creation - amazon.aws.ec2_ami: - instance_id: i-xxxxxx - wait: yes - name: newtest - tags: - Name: newtest - Service: TestService - - - name: Basic AMI Creation, without waiting - amazon.aws.ec2_ami: - instance_id: i-xxxxxx - wait: no - name: newtest - - - name: AMI Registration from EBS Snapshot - amazon.aws.ec2_ami: - name: newtest - state: present - architecture: x86_64 - virtualization_type: hvm - root_device_name: /dev/xvda - device_mapping: - - device_name: /dev/xvda - volume_size: 8 - snapshot_id: snap-xxxxxxxx - delete_on_termination: true - volume_type: gp2 - - - name: AMI Creation, with a custom root-device size and another EBS attached - amazon.aws.ec2_ami: - instance_id: i-xxxxxx - name: newtest - device_mapping: - - device_name: /dev/sda1 - size: XXX - delete_on_termination: true - volume_type: gp2 - - device_name: /dev/sdb - size: YYY - delete_on_termination: false - volume_type: gp2 - - - name: AMI Creation, excluding a volume attached at /dev/sdb - amazon.aws.ec2_ami: - instance_id: i-xxxxxx - name: newtest - device_mapping: - - device_name: /dev/sda1 - size: XXX - delete_on_termination: true - volume_type: gp2 - - device_name: /dev/sdb - no_device: yes - - - name: Deregister/Delete AMI (keep associated snapshots) - amazon.aws.ec2_ami: - image_id: "{{ instance.image_id }}" - delete_snapshot: False - state: absent - - - name: Deregister AMI (delete associated snapshots too) - amazon.aws.ec2_ami: - image_id: "{{ instance.image_id }}" - delete_snapshot: True - state: absent - - - name: Update AMI Launch Permissions, making it public - amazon.aws.ec2_ami: - image_id: "{{ instance.image_id }}" - state: present - launch_permissions: - group_names: ['all'] - - - name: Allow AMI to be launched by another account - amazon.aws.ec2_ami: - image_id: "{{ instance.image_id }}" - state: present - launch_permissions: - user_ids: ['123456789012'] - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- architecture - -
- string -
-
when AMI is created or already exists -
Architecture of image.
-
-
Sample:
-
x86_64
-
-
- block_device_mapping - -
- dictionary -
-
when AMI is created or already exists -
Block device mapping associated with image.
-
-
Sample:
-
{'/dev/sda1': {'delete_on_termination': True, 'encrypted': False, 'size': 10, 'snapshot_id': 'snap-1a03b80e7', 'volume_type': 'standard'}}
-
-
- creationDate - -
- string -
-
when AMI is created or already exists -
Creation date of image.
-
-
Sample:
-
2015-10-15T22:43:44.000Z
-
-
- description - -
- string -
-
when AMI is created or already exists -
Description of image.
-
-
Sample:
-
nat-server
-
-
- hypervisor - -
- string -
-
when AMI is created or already exists -
Type of hypervisor.
-
-
Sample:
-
xen
-
-
- image_id - -
- string -
-
when AMI is created or already exists -
ID of the image.
-
-
Sample:
-
ami-1234abcd
-
-
- is_public - -
- boolean -
-
when AMI is created or already exists -
Whether image is public.
-
-
-
- launch_permission - -
- list -
-
when AMI is created or already exists -
Permissions allowing other accounts to access the AMI.
-
-
Sample:
-
[{'group': 'all'}]
-
-
- location - -
- string -
-
when AMI is created or already exists -
Location of image.
-
-
Sample:
-
315210894379/nat-server
-
-
- name - -
- string -
-
when AMI is created or already exists -
AMI name of image.
-
-
Sample:
-
nat-server
-
-
- ownerId - -
- string -
-
when AMI is created or already exists -
Owner of image.
-
-
Sample:
-
435210894375
-
-
- platform - -
- string -
-
when AMI is created or already exists -
Platform of image.
-
-
-
- root_device_name - -
- string -
-
when AMI is created or already exists -
Root device name of image.
-
-
Sample:
-
/dev/sda1
-
-
- root_device_type - -
- string -
-
when AMI is created or already exists -
Root device type of image.
-
-
Sample:
-
ebs
-
-
- snapshots_deleted - -
- list -
-
after AMI is deregistered, if delete_snapshot=true -
A list of snapshot ids deleted after deregistering image.
-
-
Sample:
-
['snap-fbcccb8f', 'snap-cfe7cdb4']
-
-
- state - -
- string -
-
when AMI is created or already exists -
State of image.
-
-
Sample:
-
available
-
-
- tags - -
- dictionary -
-
when AMI is created or already exists -
A dictionary of tags assigned to image.
-
-
Sample:
-
{'Env': 'devel', 'Name': 'nat-server'}
-
-
- virtualization_type - -
- string -
-
when AMI is created or already exists -
Image virtualization type.
-
-
Sample:
-
hvm
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Evan Duffield (@scicoin-project) -- Constantin Bugneac (@Constantin07) -- Ross Williams (@gunzy83) -- Willem van Ketwich (@wilvk) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_ami_info.rst b/docs/amazon.aws.ec2_ami_info.rst deleted file mode 100644 index c1389e8d64e..00000000000 --- a/docs/amazon.aws.ec2_ami_info.rst +++ /dev/null @@ -1,775 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_ami_info_module: - - -*********************** -amazon.aws.ec2_ami_info -*********************** - -**Gather information about ec2 AMIs** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 AMIs -- This module was called ``amazon.aws.ec2_ami_facts`` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- describe_image_attributes - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Describe attributes (like launchPermission) of the images found.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- executable_users - -
- list - / elements=string
-
- -
Filter images by users with explicit launch permissions. Valid options are an AWS account ID, self, or all (public AMIs).
-

aliases: executable_user
-
-
- filters - -
- dictionary -
-
- -
A dict of filters to apply. Each dict item consists of a filter key and a filter value.
- -
Filter names and values are case sensitive.
-
-
- image_ids - -
- list - / elements=string
-
- -
One or more image IDs.
-

aliases: image_id
-
-
- owners - -
- list - / elements=string
-
- -
Filter the images by the owner. Valid options are an AWS account ID, self, or an AWS owner alias ( amazon | aws-marketplace | microsoft ).
-

aliases: owner
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: gather information about an AMI using ami-id - amazon.aws.ec2_ami_info: - image_ids: ami-5b488823 - - - name: gather information about all AMIs with tag key Name and value webapp - amazon.aws.ec2_ami_info: - filters: - "tag:Name": webapp - - - name: gather information about an AMI with 'AMI Name' equal to foobar - amazon.aws.ec2_ami_info: - filters: - name: foobar - - - name: gather information about Ubuntu 17.04 AMIs published by Canonical (099720109477) - amazon.aws.ec2_ami_info: - owners: 099720109477 - filters: - name: "ubuntu/images/ubuntu-zesty-17.04-*" - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- images - -
- list - / elements=dictionary
-
always -
A list of images.
-
-
  -
- architecture - -
- string -
-
always -
The architecture of the image.
-
-
Sample:
-
x86_64
-
  -
- block_device_mappings - -
- list - / elements=dictionary
-
always -
Any block device mapping entries.
-
-
   -
- device_name - -
- string -
-
always -
The device name exposed to the instance.
-
-
Sample:
-
/dev/sda1
-
   -
- ebs - -
- complex -
-
always -
EBS volumes
-
-
  -
- creation_date - -
- string -
-
always -
The date and time the image was created.
-
-
Sample:
-
2017-10-16T19:22:13.000Z
-
  -
- description - -
- string -
-
always -
The description of the AMI.
-
-
  -
- ena_support - -
- boolean -
-
always -
Whether enhanced networking with ENA is enabled.
-
-
Sample:
-
True
-
  -
- hypervisor - -
- string -
-
always -
The hypervisor type of the image.
-
-
Sample:
-
xen
-
  -
- image_id - -
- string -
-
always -
The ID of the AMI.
-
-
Sample:
-
ami-5b466623
-
  -
- image_location - -
- string -
-
always -
The location of the AMI.
-
-
Sample:
-
408466080000/Webapp
-
  -
- image_type - -
- string -
-
always -
The type of image.
-
-
Sample:
-
machine
-
  -
- launch_permissions - -
- list - / elements=dictionary
-
When image is owned by calling account and describe_image_attributes is yes. -
A List of AWS accounts may launch the AMI.
-
-
Sample:
-
[{'group': 'all'}, {'user_id': '408466080000'}]
-
   -
- group - -
- string -
-
-
A value of 'all' means the AMI is public.
-
-
   -
- user_id - -
- string -
-
-
An AWS account ID with permissions to launch the AMI.
-
-
  -
- name - -
- string -
-
always -
The name of the AMI that was provided during image creation.
-
-
Sample:
-
Webapp
-
  -
- owner_id - -
- string -
-
always -
The AWS account ID of the image owner.
-
-
Sample:
-
408466080000
-
  -
- public - -
- boolean -
-
always -
Whether the image has public launch permissions.
-
-
Sample:
-
True
-
  -
- root_device_name - -
- string -
-
always -
The device name of the root device.
-
-
Sample:
-
/dev/sda1
-
  -
- root_device_type - -
- string -
-
always -
The type of root device used by the AMI.
-
-
Sample:
-
ebs
-
  -
- sriov_net_support - -
- string -
-
always -
Whether enhanced networking is enabled.
-
-
Sample:
-
simple
-
  -
- state - -
- string -
-
always -
The current state of the AMI.
-
-
Sample:
-
available
-
  -
- tags - -
- dictionary -
-
always -
Any tags assigned to the image.
-
-
  -
- virtualization_type - -
- string -
-
always -
The type of virtualization of the AMI.
-
-
Sample:
-
hvm
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Prasad Katti (@prasadkatti) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_elb_lb.rst b/docs/amazon.aws.ec2_elb_lb.rst deleted file mode 100644 index 1001e9c159c..00000000000 --- a/docs/amazon.aws.ec2_elb_lb.rst +++ /dev/null @@ -1,798 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_elb_lb_module: - - -********************* -amazon.aws.ec2_elb_lb -********************* - -**Creates, updates or destroys an Amazon ELB.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Returns information about the load balancer. -- Will be marked changed when called only if state is changed. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 2.6 -- boto - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- access_logs - -
- dictionary -
-
- -
An associative array of access logs configuration settings (see example)
-
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- connection_draining_timeout - -
- integer -
-
- -
Wait a specified timeout allowing connections to drain before terminating an instance
-
-
- cross_az_load_balancing - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Distribute load across all configured Availability Zones
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- health_check - -
- dictionary -
-
- -
An associative array of health check configuration settings (see example)
-
-
- idle_timeout - -
- integer -
-
- -
ELB connections from clients and to servers are timed out after this amount of time
-
-
- instance_ids - -
- list -
-
- -
List of instance ids to attach to this ELB
-
-
- listeners - -
- list -
-
- -
List of ports/protocols for this ELB to listen on (see example)
-
-
- name - -
- string - / required
-
- -
The name of the ELB
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- purge_instance_ids - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Purge existing instance ids on ELB that are not found in instance_ids
-
-
- purge_listeners - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Purge existing listeners on ELB that are not found in listeners
-
-
- purge_subnets - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Purge existing subnet on ELB that are not found in subnets
-
-
- purge_zones - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Purge existing availability zones on ELB that are not found in zones
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- scheme - -
- string -
-
-
    Choices: -
  • internal
  • -
  • internet-facing ←
  • -
-
-
The scheme to use when creating the ELB. For a private VPC-visible ELB use 'internal'. If you choose to update your scheme with a different value the ELB will be destroyed and recreated. To update scheme you must use the option wait.
-
-
- security_group_ids - -
- list -
-
- -
A list of security groups to apply to the elb
-
-
- security_group_names - -
- list -
-
- -
A list of security group names to apply to the elb
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- state - -
- string - / required
-
-
    Choices: -
  • absent
  • -
  • present
  • -
-
-
Create or destroy the ELB
-
-
- stickiness - -
- dictionary -
-
- -
An associative array of stickiness policy settings. Policy will be applied to all listeners ( see example )
-
-
- subnets - -
- list -
-
- -
A list of VPC subnets to use when creating ELB. Zones should be empty if using this.
-
-
- tags - -
- dictionary -
-
- -
An associative array of tags. To delete all tags, supply an empty dict.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to no, SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
When specified, Ansible will check the status of the load balancer to ensure it has been successfully removed from AWS.
-
-
- wait_timeout - -
- integer -
-
- Default:
60
-
-
Used in conjunction with wait. Number of seconds to wait for the elb to be terminated. A maximum of 600 seconds (10 minutes) is allowed.
-
-
- zones - -
- list -
-
- -
List of availability zones to enable on this ELB
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: None of these examples set aws_access_key, aws_secret_key, or region. - # It is assumed that their matching environment variables are set. - - # Basic provisioning example (non-VPC) - - - amazon.aws.ec2_elb_lb: - name: "test-please-delete" - state: present - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http # options are http, https, ssl, tcp - load_balancer_port: 80 - instance_port: 80 - proxy_protocol: True - - protocol: https - load_balancer_port: 443 - instance_protocol: http # optional, defaults to value of protocol setting - instance_port: 80 - # ssl certificate required for https or ssl - ssl_certificate_id: "arn:aws:iam::123456789012:server-certificate/company/servercerts/ProdServerCert" - - # Internal ELB example - - - amazon.aws.ec2_elb_lb: - name: "test-vpc" - scheme: internal - state: present - instance_ids: - - i-abcd1234 - purge_instance_ids: true - subnets: - - subnet-abcd1234 - - subnet-1a2b3c4d - listeners: - - protocol: http # options are http, https, ssl, tcp - load_balancer_port: 80 - instance_port: 80 - - # Configure a health check and the access logs - - amazon.aws.ec2_elb_lb: - name: "test-please-delete" - state: present - zones: - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - health_check: - ping_protocol: http # options are http, https, ssl, tcp - ping_port: 80 - ping_path: "/index.html" # not required for tcp or ssl - response_timeout: 5 # seconds - interval: 30 # seconds - unhealthy_threshold: 2 - healthy_threshold: 10 - access_logs: - interval: 5 # minutes (defaults to 60) - s3_location: "my-bucket" # This value is required if access_logs is set - s3_prefix: "logs" - - # Ensure ELB is gone - - amazon.aws.ec2_elb_lb: - name: "test-please-delete" - state: absent - - # Ensure ELB is gone and wait for check (for default timeout) - - amazon.aws.ec2_elb_lb: - name: "test-please-delete" - state: absent - wait: yes - - # Ensure ELB is gone and wait for check with timeout value - - amazon.aws.ec2_elb_lb: - name: "test-please-delete" - state: absent - wait: yes - wait_timeout: 600 - - # Normally, this module will purge any listeners that exist on the ELB - # but aren't specified in the listeners parameter. If purge_listeners is - # false it leaves them alone - - amazon.aws.ec2_elb_lb: - name: "test-please-delete" - state: present - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - purge_listeners: no - - # Normally, this module will leave availability zones that are enabled - # on the ELB alone. If purge_zones is true, then any extraneous zones - # will be removed - - amazon.aws.ec2_elb_lb: - name: "test-please-delete" - state: present - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - purge_zones: yes - - # Creates a ELB and assigns a list of subnets to it. - - amazon.aws.ec2_elb_lb: - state: present - name: 'New ELB' - security_group_ids: 'sg-123456, sg-67890' - region: us-west-2 - subnets: 'subnet-123456,subnet-67890' - purge_subnets: yes - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - - # Create an ELB with connection draining, increased idle timeout and cross availability - # zone load balancing - - amazon.aws.ec2_elb_lb: - name: "New ELB" - state: present - connection_draining_timeout: 60 - idle_timeout: 300 - cross_az_load_balancing: "yes" - region: us-east-1 - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - - # Create an ELB with load balancer stickiness enabled - - amazon.aws.ec2_elb_lb: - name: "New ELB" - state: present - region: us-east-1 - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - stickiness: - type: loadbalancer - enabled: yes - expiration: 300 - - # Create an ELB with application stickiness enabled - - amazon.aws.ec2_elb_lb: - name: "New ELB" - state: present - region: us-east-1 - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - stickiness: - type: application - enabled: yes - cookie: SESSIONID - - # Create an ELB and add tags - - amazon.aws.ec2_elb_lb: - name: "New ELB" - state: present - region: us-east-1 - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - tags: - Name: "New ELB" - stack: "production" - client: "Bob" - - # Delete all tags from an ELB - - amazon.aws.ec2_elb_lb: - name: "New ELB" - state: present - region: us-east-1 - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - tags: {} - - - - - -Status ------- - - -Authors -~~~~~~~ - -- Jim Dalton (@jsdalton) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_eni.rst b/docs/amazon.aws.ec2_eni.rst deleted file mode 100644 index d9e47d9931e..00000000000 --- a/docs/amazon.aws.ec2_eni.rst +++ /dev/null @@ -1,809 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_eni_module: - - -****************** -amazon.aws.ec2_eni -****************** - -**Create and optionally attach an Elastic Network Interface (ENI) to an instance** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Create and optionally attach an Elastic Network Interface (ENI) to an instance. If an ENI ID or private_ip is provided, the existing ENI (if any) will be modified. The 'attached' parameter controls the attachment status of the network interface. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 2.6 -- boto - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- allow_reassignment - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether to allow an IP address that is already assigned to another network interface or instance to be reassigned to the specified network interface.
-
-
- attached - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Specifies if network interface should be attached or detached from instance. If omitted, attachment status won't change
-
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- delete_on_termination - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Delete the interface when the instance it is attached to is terminated. You can only specify this flag when the interface is being modified, not on creation.
-
-
- description - -
- string -
-
- -
Optional description of the ENI.
-
-
- device_index - -
- integer -
-
- Default:
0
-
-
The index of the device for the network interface attachment on the instance.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- eni_id - -
- string -
-
- -
The ID of the ENI (to modify).
-
If eni_id=None and state=present, a new eni will be created.
-
-
- force_detach - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Force detachment of the interface. This applies either when explicitly detaching the interface by setting instance_id=None or when deleting an interface with state=absent.
-
-
- instance_id - -
- string -
-
- -
Instance ID that you wish to attach ENI to.
-
Since version 2.2, use the attached parameter to attach or detach an ENI. Prior to 2.2, to detach an ENI from an instance, use None.
-
-
- private_ip_address - -
- string -
-
- -
Private IP address.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- purge_secondary_private_ip_addresses - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
To be used with secondary_private_ip_addresses to determine whether or not to remove any secondary IP addresses other than those specified.
-
Set secondary_private_ip_addresses=[] to purge all secondary addresses.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- secondary_private_ip_address_count - -
- integer -
-
- -
The number of secondary IP addresses to assign to the network interface. This option is mutually exclusive of secondary_private_ip_addresses
-
-
- secondary_private_ip_addresses - -
- list - / elements=string
-
- -
A list of IP addresses to assign as secondary IP addresses to the network interface. This option is mutually exclusive of secondary_private_ip_address_count
-
-
- security_groups - -
- list - / elements=string
-
- -
List of security groups associated with the interface. Only used when state=present.
-
Since version 2.2, you can specify security groups by ID or by name or a combination of both. Prior to 2.2, you can specify only by ID.
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- source_dest_check - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
By default, interfaces perform source/destination checks. NAT instances however need this check to be disabled. You can only specify this flag when the interface is being modified, not on creation.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Create or delete ENI.
-
-
- subnet_id - -
- string -
-
- -
ID of subnet in which to create the ENI.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - This module identifies and ENI based on either the *eni_id*, a combination of *private_ip_address* and *subnet_id*, or a combination of *instance_id* and *device_id*. Any of these options will let you specify a particular ENI. - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Create an ENI. As no security group is defined, ENI will be created in default security group - - amazon.aws.ec2_eni: - private_ip_address: 172.31.0.20 - subnet_id: subnet-xxxxxxxx - state: present - - # Create an ENI and attach it to an instance - - amazon.aws.ec2_eni: - instance_id: i-xxxxxxx - device_index: 1 - private_ip_address: 172.31.0.20 - subnet_id: subnet-xxxxxxxx - state: present - - # Create an ENI with two secondary addresses - - amazon.aws.ec2_eni: - subnet_id: subnet-xxxxxxxx - state: present - secondary_private_ip_address_count: 2 - - # Assign a secondary IP address to an existing ENI - # This will purge any existing IPs - - amazon.aws.ec2_eni: - subnet_id: subnet-xxxxxxxx - eni_id: eni-yyyyyyyy - state: present - secondary_private_ip_addresses: - - 172.16.1.1 - - # Remove any secondary IP addresses from an existing ENI - - amazon.aws.ec2_eni: - subnet_id: subnet-xxxxxxxx - eni_id: eni-yyyyyyyy - state: present - secondary_private_ip_address_count: 0 - - # Destroy an ENI, detaching it from any instance if necessary - - amazon.aws.ec2_eni: - eni_id: eni-xxxxxxx - force_detach: true - state: absent - - # Update an ENI - - amazon.aws.ec2_eni: - eni_id: eni-xxxxxxx - description: "My new description" - state: present - - # Update an ENI identifying it by private_ip_address and subnet_id - - amazon.aws.ec2_eni: - subnet_id: subnet-xxxxxxx - private_ip_address: 172.16.1.1 - description: "My new description" - - # Detach an ENI from an instance - - amazon.aws.ec2_eni: - eni_id: eni-xxxxxxx - instance_id: None - state: present - - ### Delete an interface on termination - # First create the interface - - amazon.aws.ec2_eni: - instance_id: i-xxxxxxx - device_index: 1 - private_ip_address: 172.31.0.20 - subnet_id: subnet-xxxxxxxx - state: present - register: eni - - # Modify the interface to enable the delete_on_terminaton flag - - amazon.aws.ec2_eni: - eni_id: "{{ eni.interface.id }}" - delete_on_termination: true - - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- interface - -
- complex -
-
when state != absent -
Network interface attributes
-
-
  -
- description - -
- string -
-
-
interface description
-
-
Sample:
-
Firewall network interface
-
  -
- groups - -
- list - / elements=dictionary
-
-
list of security groups
-
-
Sample:
-
[{'sg-f8a8a9da': 'default'}]
-
  -
- id - -
- string -
-
-
network interface id
-
-
Sample:
-
eni-1d889198
-
  -
- mac_address - -
- string -
-
-
interface's physical address
-
-
Sample:
-
00:00:5E:00:53:23
-
  -
- owner_id - -
- string -
-
-
aws account id
-
-
Sample:
-
812381371
-
  -
- private_ip_address - -
- string -
-
-
primary ip address of this interface
-
-
Sample:
-
10.20.30.40
-
  -
- private_ip_addresses - -
- list - / elements=dictionary
-
-
list of all private ip addresses associated to this interface
-
-
Sample:
-
[{'primary_address': True, 'private_ip_address': '10.20.30.40'}]
-
  -
- source_dest_check - -
- boolean -
-
-
value of source/dest check flag
-
-
Sample:
-
True
-
  -
- status - -
- string -
-
-
network interface status
-
-
Sample:
-
pending
-
  -
- subnet_id - -
- string -
-
-
which vpc subnet the interface is bound
-
-
Sample:
-
subnet-b0a0393c
-
  -
- vpc_id - -
- string -
-
-
which vpc this network interface is bound
-
-
Sample:
-
vpc-9a9a9da
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_eni_info.rst b/docs/amazon.aws.ec2_eni_info.rst deleted file mode 100644 index 37493c29009..00000000000 --- a/docs/amazon.aws.ec2_eni_info.rst +++ /dev/null @@ -1,655 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_eni_info_module: - - -*********************** -amazon.aws.ec2_eni_info -*********************** - -**Gather information about ec2 ENI interfaces in AWS** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 ENI interfaces in AWS. -- This module was called ``ec2_eni_facts`` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- filters - -
- dictionary -
-
- -
A dict of filters to apply. Each dict item consists of a filter key and a filter value. See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeNetworkInterfaces.html for possible filters.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Gather information about all ENIs - - amazon.aws.ec2_eni_info: - - # Gather information about a particular ENI - - amazon.aws.ec2_eni_info: - filters: - network-interface-id: eni-xxxxxxx - - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- network_interfaces - -
- complex -
-
always -
List of matching elastic network interfaces
-
-
  -
- association - -
- dictionary -
-
always, empty dict if no association exists -
Info of associated elastic IP (EIP)
-
-
Sample:
-
{'allocation_id': 'eipalloc-5sdf123', 'association_id': 'eipassoc-8sdf123', 'ip_owner_id': '4415120123456', 'public_dns_name': 'ec2-52-1-0-63.compute-1.amazonaws.com', 'public_ip': '52.1.0.63'}
-
  -
- attachment - -
- dictionary -
-
always, empty dict if ENI is not attached -
Info about attached ec2 instance
-
-
Sample:
-
{'attach_time': '2017-08-05T15:25:47+00:00', 'attachment_id': 'eni-attach-149d21234', 'delete_on_termination': False, 'device_index': 1, 'instance_id': 'i-15b8d3cadbafa1234', 'instance_owner_id': '4415120123456', 'status': 'attached'}
-
  -
- availability_zone - -
- string -
-
always -
Availability zone of ENI
-
-
Sample:
-
us-east-1b
-
  -
- description - -
- string -
-
always -
Description text for ENI
-
-
Sample:
-
My favourite network interface
-
  -
- groups - -
- list -
-
always -
List of attached security groups
-
-
Sample:
-
[{'group_id': 'sg-26d0f1234', 'group_name': 'my_ec2_security_group'}]
-
  -
- id - -
- string -
-
always -
The id of the ENI (alias for network_interface_id)
-
-
Sample:
-
eni-392fsdf
-
  -
- interface_type - -
- string -
-
always -
Type of the network interface
-
-
Sample:
-
interface
-
  -
- ipv6_addresses - -
- list -
-
always -
List of IPv6 addresses for this interface
-
-
  -
- mac_address - -
- string -
-
always -
MAC address of the network interface
-
-
Sample:
-
0a:f8:10:2f:ab:a1
-
  -
- network_interface_id - -
- string -
-
always -
The id of the ENI
-
-
Sample:
-
eni-392fsdf
-
  -
- owner_id - -
- string -
-
always -
AWS account id of the owner of the ENI
-
-
Sample:
-
4415120123456
-
  -
- private_dns_name - -
- string -
-
always -
Private DNS name for the ENI
-
-
Sample:
-
ip-172-16-1-180.ec2.internal
-
  -
- private_ip_address - -
- string -
-
always -
Private IP address for the ENI
-
-
Sample:
-
172.16.1.180
-
  -
- private_ip_addresses - -
- list -
-
always -
List of private IP addresses attached to the ENI
-
-
  -
- requester_id - -
- string -
-
always -
The ID of the entity that launched the ENI
-
-
Sample:
-
AIDAIONYVJQNIAZFT3ABC
-
  -
- requester_managed - -
- boolean -
-
always -
Indicates whether the network interface is being managed by an AWS service.
-
-
  -
- source_dest_check - -
- boolean -
-
always -
Indicates whether the network interface performs source/destination checking.
-
-
  -
- status - -
- string -
-
always -
Indicates if the network interface is attached to an instance or not
-
-
Sample:
-
in-use
-
  -
- subnet_id - -
- string -
-
always -
Subnet ID the ENI is in
-
-
Sample:
-
subnet-7bbf01234
-
  -
- tag_set - -
- dictionary -
-
always -
Dictionary of tags added to the ENI
-
-
  -
- vpc_id - -
- string -
-
always -
ID of the VPC the network interface it part of
-
-
Sample:
-
vpc-b3f1f123
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_group.rst b/docs/amazon.aws.ec2_group.rst deleted file mode 100644 index 54db1008b81..00000000000 --- a/docs/amazon.aws.ec2_group.rst +++ /dev/null @@ -1,669 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_group_module: - - -******************** -amazon.aws.ec2_group -******************** - -**maintain an ec2 VPC security group.** - - -Version added: 1.3 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- maintains ec2 security groups. This module has a dependency on python-boto >= 2.5 - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
added in 2.8
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- description - -
- - -
-
- -
Description of the security group. Required when state is present.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- group_id - -
- - -
-
added in 2.4
- -
Id of group to delete (works only with absent).
-
One of and only one of name or group_id is required.
-
-
- name - -
- - -
-
- -
Name of the security group.
-
One of and only one of name or group_id is required.
-
Required if state=present.
-
-
- profile - -
- string -
-
added in 1.6
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- purge_rules - -
- boolean -
-
added in 1.8
-
    Choices: -
  • no
  • -
  • yes
  • -
- Default:
"true"
-
-
Purge existing rules on security group that are not found in rules
-
-
- purge_rules_egress - -
- boolean -
-
added in 1.8
-
    Choices: -
  • no
  • -
  • yes
  • -
- Default:
"true"
-
-
Purge existing rules_egress on security group that are not found in rules_egress
-
-
- purge_tags - -
- boolean -
-
added in 2.4
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
If yes, existing tags will be purged from the resource to match exactly what is defined by tags parameter. If the tags parameter is not set then tags will not be modified.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- rules - -
- - -
-
- -
List of firewall inbound rules to enforce in this group (see example). If none are supplied, no inbound rules will be enabled. Rules list may include its own name in `group_name`. This allows idempotent loopback additions (e.g. allow group to access itself). Rule sources list support was added in version 2.4. This allows to define multiple sources per source type as well as multiple source types per rule. Prior to 2.4 an individual source is allowed. In version 2.5 support for rule descriptions was added.
-
-
- rules_egress - -
- - -
-
added in 1.6
- -
List of firewall outbound rules to enforce in this group (see example). If none are supplied, a default all-out rule is assumed. If an empty list is supplied, no outbound rules will be enabled. Rule Egress sources list support was added in version 2.4. In version 2.5 support for rule descriptions was added.
-
-
- security_token - -
- string -
-
added in 1.6
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- state - -
- - -
-
added in 1.4
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Create or delete a security group
-
-
- tags - -
- - -
-
added in 2.4
- -
A dictionary of one or more tags to assign to the security group.
-
-
- validate_certs - -
- boolean -
-
added in 1.5
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- vpc_id - -
- - -
-
- -
ID of the VPC to create the group in.
-
-
- - -Notes ------ - -.. note:: - - If a rule declares a group_name and that group doesn't exist, it will be automatically created. In that case, group_desc should be provided as well. The module will refuse to create a depended-on group without a description. - - Preview diff mode support is added in version 2.7. - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - - name: example using security group rule descriptions - ec2_group: - name: "{{ name }}" - description: sg with rule descriptions - vpc_id: vpc-xxxxxxxx - profile: "{{ aws_profile }}" - region: us-east-1 - rules: - - proto: tcp - ports: - - 80 - cidr_ip: 0.0.0.0/0 - rule_desc: allow all on port 80 - - - name: example ec2 group - ec2_group: - name: example - description: an example EC2 group - vpc_id: 12345 - region: eu-west-1 - aws_secret_key: SECRET - aws_access_key: ACCESS - rules: - - proto: tcp - from_port: 80 - to_port: 80 - cidr_ip: 0.0.0.0/0 - - proto: tcp - from_port: 22 - to_port: 22 - cidr_ip: 10.0.0.0/8 - - proto: tcp - from_port: 443 - to_port: 443 - # this should only be needed for EC2 Classic security group rules - # because in a VPC an ELB will use a user-account security group - group_id: amazon-elb/sg-87654321/amazon-elb-sg - - proto: tcp - from_port: 3306 - to_port: 3306 - group_id: 123412341234/sg-87654321/exact-name-of-sg - - proto: udp - from_port: 10050 - to_port: 10050 - cidr_ip: 10.0.0.0/8 - - proto: udp - from_port: 10051 - to_port: 10051 - group_id: sg-12345678 - - proto: icmp - from_port: 8 # icmp type, -1 = any type - to_port: -1 # icmp subtype, -1 = any subtype - cidr_ip: 10.0.0.0/8 - - proto: all - # the containing group name may be specified here - group_name: example - - proto: all - # in the 'proto' attribute, if you specify -1, all, or a protocol number other than tcp, udp, icmp, or 58 (ICMPv6), - # traffic on all ports is allowed, regardless of any ports you specify - from_port: 10050 # this value is ignored - to_port: 10050 # this value is ignored - cidr_ip: 10.0.0.0/8 - - rules_egress: - - proto: tcp - from_port: 80 - to_port: 80 - cidr_ip: 0.0.0.0/0 - cidr_ipv6: 64:ff9b::/96 - group_name: example-other - # description to use if example-other needs to be created - group_desc: other example EC2 group - - - name: example2 ec2 group - ec2_group: - name: example2 - description: an example2 EC2 group - vpc_id: 12345 - region: eu-west-1 - rules: - # 'ports' rule keyword was introduced in version 2.4. It accepts a single port value or a list of values including ranges (from_port-to_port). - - proto: tcp - ports: 22 - group_name: example-vpn - - proto: tcp - ports: - - 80 - - 443 - - 8080-8099 - cidr_ip: 0.0.0.0/0 - # Rule sources list support was added in version 2.4. This allows to define multiple sources per source type as well as multiple source types per rule. - - proto: tcp - ports: - - 6379 - - 26379 - group_name: - - example-vpn - - example-redis - - proto: tcp - ports: 5665 - group_name: example-vpn - cidr_ip: - - 172.16.1.0/24 - - 172.16.17.0/24 - cidr_ipv6: - - 2607:F8B0::/32 - - 64:ff9b::/96 - group_id: - - sg-edcd9784 - diff: True - - - name: "Delete group by its id" - ec2_group: - region: eu-west-1 - group_id: sg-33b4ee5b - state: absent - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- description - -
- string -
-
on create/update -
Description of security group
-
-
Sample:
-
My Security Group
-
-
- group_id - -
- string -
-
on create/update -
Security group id
-
-
Sample:
-
sg-abcd1234
-
-
- group_name - -
- string -
-
on create/update -
Security group name
-
-
Sample:
-
My Security Group
-
-
- ip_permissions - -
- list -
-
on create/update -
Inbound rules associated with the security group.
-
-
Sample:
-
[{'from_port': 8182, 'ip_protocol': 'tcp', 'ip_ranges': [{'cidr_ip': '1.1.1.1/32'}], 'ipv6_ranges': [], 'prefix_list_ids': [], 'to_port': 8182, 'user_id_group_pairs': []}]
-
-
- ip_permissions_egress - -
- list -
-
on create/update -
Outbound rules associated with the security group.
-
-
Sample:
-
[{'ip_protocol': -1, 'ip_ranges': [{'cidr_ip': '0.0.0.0/0', 'ipv6_ranges': [], 'prefix_list_ids': [], 'user_id_group_pairs': []}]}]
-
-
- owner_id - -
- integer -
-
on create/update -
AWS Account ID of the security group
-
-
Sample:
-
123456789012
-
-
- tags - -
- dictionary -
-
on create/update -
Tags associated with the security group
-
-
Sample:
-
{'Name': 'My Security Group', 'Purpose': 'protecting stuff'}
-
-
- vpc_id - -
- string -
-
on create/update -
ID of VPC to which the security group belongs
-
-
Sample:
-
vpc-abcd1234
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Andrew de Quincey (@adq) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_group_info.rst b/docs/amazon.aws.ec2_group_info.rst deleted file mode 100644 index 8dfeb933ca3..00000000000 --- a/docs/amazon.aws.ec2_group_info.rst +++ /dev/null @@ -1,322 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_group_info_module: - - -************************* -amazon.aws.ec2_group_info -************************* - -**Gather information about ec2 security groups in AWS.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 security groups in AWS. -- This module was called ``amazon.aws.ec2_group_facts`` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- filters - -
- dictionary -
-
- Default:
{}
-
-
A dict of filters to apply. Each dict item consists of a filter key and a filter value. See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSecurityGroups.html for possible filters. Filter names and values are case sensitive. You can also use underscores (_) instead of dashes (-) in the filter keys, which will take precedence in case of conflict.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - By default, the module will return all security groups. To limit results use the appropriate filters. - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Gather information about all security groups - - amazon.aws.ec2_group_info: - - # Gather information about all security groups in a specific VPC - - amazon.aws.ec2_group_info: - filters: - vpc-id: vpc-12345678 - - # Gather information about all security groups in a specific VPC - - amazon.aws.ec2_group_info: - filters: - vpc-id: vpc-12345678 - - # Gather information about a security group - - amazon.aws.ec2_group_info: - filters: - group-name: example-1 - - # Gather information about a security group by id - - amazon.aws.ec2_group_info: - filters: - group-id: sg-12345678 - - # Gather information about a security group with multiple filters, also mixing the use of underscores as filter keys - - amazon.aws.ec2_group_info: - filters: - group_id: sg-12345678 - vpc-id: vpc-12345678 - - # Gather information about various security groups - - amazon.aws.ec2_group_info: - filters: - group-name: - - example-1 - - example-2 - - example-3 - - # Gather information about any security group with a tag key Name and value Example. - # The quotes around 'tag:name' are important because of the colon in the value - - amazon.aws.ec2_group_info: - filters: - "tag:Name": Example - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- security_groups - -
- list -
-
always -
Security groups that match the provided filters. Each element consists of a dict with all the information related to that security group.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Henrique Rodrigues (@Sodki) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_key.rst b/docs/amazon.aws.ec2_key.rst deleted file mode 100644 index 64d7ef001c5..00000000000 --- a/docs/amazon.aws.ec2_key.rst +++ /dev/null @@ -1,480 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_key_module: - - -****************** -amazon.aws.ec2_key -****************** - -**create or delete an ec2 key pair** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- create or delete an ec2 key pair. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Force overwrite of already existing key pair if key has changed.
-
-
- key_material - -
- string -
-
- -
Public key material.
-
-
- name - -
- string - / required
-
- -
Name of the key pair.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
create or delete keypair
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
This option has no effect since version 2.5 and will be removed after 2022-06-01.
-
-
- wait_timeout - -
- integer -
-
- -
This option has no effect since version 2.5 and will be removed after 2022-06-01.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: create a new ec2 key pair, returns generated private key - amazon.aws.ec2_key: - name: my_keypair - - - name: create key pair using provided key_material - amazon.aws.ec2_key: - name: my_keypair - key_material: 'ssh-rsa AAAAxyz...== me@example.com' - - - name: create key pair using key_material obtained using 'file' lookup plugin - amazon.aws.ec2_key: - name: my_keypair - key_material: "{{ lookup('file', '/path/to/public_key/id_rsa.pub') }}" - - # try creating a key pair with the name of an already existing keypair - # but don't overwrite it even if the key is different (force=false) - - name: try creating a key pair with name of an already existing keypair - amazon.aws.ec2_key: - name: my_existing_keypair - key_material: 'ssh-rsa AAAAxyz...== me@example.com' - force: false - - - name: remove key pair by name - amazon.aws.ec2_key: - name: my_keypair - state: absent - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- changed - -
- boolean -
-
always -
whether a keypair was created/deleted
-
-
Sample:
-
True
-
-
- key - -
- complex -
-
always -
details of the keypair (this is set to null when state is absent)
-
-
  -
- fingerprint - -
- string -
-
when state is present -
fingerprint of the key
-
-
Sample:
-
b0:22:49:61:d9:44:9d:0c:7e:ac:8a:32:93:21:6c:e8:fb:59:62:43
-
  -
- name - -
- string -
-
when state is present -
name of the keypair
-
-
Sample:
-
my_keypair
-
  -
- private_key - -
- string -
-
when a new keypair is created by AWS (key_material is not provided) -
private key of a newly created keypair
-
-
Sample:
-
-----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKC... -----END RSA PRIVATE KEY-----
-
-
- msg - -
- string -
-
always -
short message describing the action taken
-
-
Sample:
-
key pair created
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Vincent Viallet (@zbal) -- Prasad Katti (@prasadkatti) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_metadata_facts.rst b/docs/amazon.aws.ec2_metadata_facts.rst deleted file mode 100644 index cb24c6d426a..00000000000 --- a/docs/amazon.aws.ec2_metadata_facts.rst +++ /dev/null @@ -1,1598 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_metadata_facts_module: - - -***************************** -amazon.aws.ec2_metadata_facts -***************************** - -**Gathers facts (instance metadata) about remote hosts within ec2** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module fetches data from the instance metadata endpoint in ec2 as per https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html. -- The module must be called from within the EC2 instance itself. - - - - - -Notes ------ - -.. note:: - - Parameters to filter on ec2_metadata_facts may be added later. - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Gather EC2 metadata facts - - amazon.aws.ec2_metadata_facts: - - - debug: - msg: "This instance is a t1.micro" - when: ansible_ec2_instance_type == "t1.micro" - - - -Returned Facts --------------- -Facts returned by this module are added/updated in the ``hostvars`` host facts and can be referenced by name just like any other host fact. They do not need to be registered in order to use them. - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
FactReturnedDescription
-
- ansible_ec2_ami_id - -
- string -
-
-
The AMI ID used to launch the instance. -
-
-
Sample:
-
ami-XXXXXXXX
-
-
- ansible_ec2_ami_launch_index - -
- string -
-
-
If you started more than one instance at the same time, this value indicates the order in which the instance was launched. -
-
The value of the first instance launched is 0. -
-
-
Sample:
-
0
-
-
- ansible_ec2_ami_manifest_path - -
- string -
-
-
The path to the AMI manifest file in Amazon S3. -
-
If you used an Amazon EBS-backed AMI to launch the instance, the returned result is unknown. -
-
-
Sample:
-
(unknown)
-
-
- ansible_ec2_ancestor_ami_ids - -
- string -
-
-
The AMI IDs of any instances that were rebundled to create this AMI. -
-
This value will only exist if the AMI manifest file contained an ancestor-amis key. -
-
-
Sample:
-
(unknown)
-
-
- ansible_ec2_block_device_mapping_ami - -
- string -
-
-
The virtual device that contains the root/boot file system. -
-
-
Sample:
-
/dev/sda1
-
-
- ansible_ec2_block_device_mapping_ebsN - -
- string -
-
-
The virtual devices associated with Amazon EBS volumes, if any are present. -
-
Amazon EBS volumes are only available in metadata if they were present at launch time or when the instance was last started. -
-
The N indicates the index of the Amazon EBS volume (such as ebs1 or ebs2). -
-
-
Sample:
-
/dev/xvdb
-
-
- ansible_ec2_block_device_mapping_ephemeralN - -
- string -
-
-
The virtual devices associated with ephemeral devices, if any are present. The N indicates the index of the ephemeral volume. -
-
-
Sample:
-
/dev/xvdc
-
-
- ansible_ec2_block_device_mapping_root - -
- string -
-
-
The virtual devices or partitions associated with the root devices, or partitions on the virtual device, where the root (/ or C) file system is associated with the given instance. -
-
-
Sample:
-
/dev/sda1
-
-
- ansible_ec2_block_device_mapping_swap - -
- string -
-
-
The virtual devices associated with swap. Not always present. -
-
-
Sample:
-
/dev/sda2
-
-
- ansible_ec2_fws_instance_monitoring - -
- string -
-
-
Value showing whether the customer has enabled detailed one-minute monitoring in CloudWatch. -
-
-
Sample:
-
enabled
-
-
- ansible_ec2_hostname - -
- string -
-
-
The private IPv4 DNS hostname of the instance. -
-
In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0). -
-
-
Sample:
-
ip-10-0-0-1.ec2.internal
-
-
- ansible_ec2_iam_info - -
- complex -
-
-
If there is an IAM role associated with the instance, contains information about the last time the instance profile was updated, including the instance's LastUpdated date, InstanceProfileArn, and InstanceProfileId. Otherwise, not present. -
-
-
-
- InstanceProfileArn - -
- string -
-
-
The ARN of the InstanceProfile associated with the Instance. -
-
-
-
- InstanceProfileId - -
- string -
-
-
The Id of the InstanceProfile associated with the Instance. -
-
-
-
- LastUpdated - -
- string -
-
-
The last time which InstanceProfile is associated with the Instance changed. -
-
-
-
- ansible_ec2_iam_info_instanceprofilearn - -
- string -
-
-
The IAM instance profile ARN. -
-
-
Sample:
-
arn:aws:iam::<account id>:instance-profile/<role name>
-
-
- ansible_ec2_iam_info_instanceprofileid - -
- string -
-
-
IAM instance profile ID. -
-
-
-
- ansible_ec2_iam_info_lastupdated - -
- string -
-
-
IAM info last updated time. -
-
-
Sample:
-
2017-05-12T02:42:27Z
-
-
- ansible_ec2_iam_instance_profile_role - -
- string -
-
-
IAM instance role. -
-
-
Sample:
-
role_name
-
-
- ansible_ec2_iam_security_credentials_ - -
- string -
-
-
If there is an IAM role associated with the instance, role-name is the name of the role, and role-name contains the temporary security credentials associated with the role. Otherwise, not present. -
-
-
-
- ansible_ec2_iam_security_credentials__accesskeyid - -
- string -
-
-
IAM role access key ID. -
-
-
-
- ansible_ec2_iam_security_credentials__code - -
- string -
-
-
IAM code. -
-
-
Sample:
-
Success
-
-
- ansible_ec2_iam_security_credentials__expiration - -
- string -
-
-
IAM role credentials expiration time. -
-
-
Sample:
-
2017-05-12T09:11:41Z
-
-
- ansible_ec2_iam_security_credentials__lastupdated - -
- string -
-
-
IAM role last updated time. -
-
-
Sample:
-
2017-05-12T02:40:44Z
-
-
- ansible_ec2_iam_security_credentials__secretaccesskey - -
- string -
-
-
IAM role secret access key. -
-
-
-
- ansible_ec2_iam_security_credentials__token - -
- string -
-
-
IAM role token. -
-
-
-
- ansible_ec2_iam_security_credentials__type - -
- string -
-
-
IAM role type. -
-
-
Sample:
-
AWS-HMAC
-
-
- ansible_ec2_instance_action - -
- string -
-
-
Notifies the instance that it should reboot in preparation for bundling. -
-
-
Sample:
-
none
-
-
- ansible_ec2_instance_id - -
- string -
-
-
The ID of this instance. -
-
-
Sample:
-
i-XXXXXXXXXXXXXXXXX
-
-
- ansible_ec2_instance_identity_document - -
- string -
-
-
JSON containing instance attributes, such as instance-id, private IP address, etc. -
-
-
-
- ansible_ec2_instance_identity_document_accountid - -
- string -
-
-
-
-
-
Sample:
-
012345678901
-
-
- ansible_ec2_instance_identity_document_architecture - -
- string -
-
-
Instance system architecture. -
-
-
Sample:
-
x86_64
-
-
- ansible_ec2_instance_identity_document_availabilityzone - -
- string -
-
-
The Availability Zone in which the instance launched. -
-
-
Sample:
-
us-east-1a
-
-
- ansible_ec2_instance_identity_document_billingproducts - -
- string -
-
-
Billing products for this instance. -
-
-
-
- ansible_ec2_instance_identity_document_devpayproductcodes - -
- string -
-
-
Product codes for the launched AMI. -
-
-
-
- ansible_ec2_instance_identity_document_imageid - -
- string -
-
-
The AMI ID used to launch the instance. -
-
-
Sample:
-
ami-01234567
-
-
- ansible_ec2_instance_identity_document_instanceid - -
- string -
-
-
The ID of this instance. -
-
-
Sample:
-
i-0123456789abcdef0
-
-
- ansible_ec2_instance_identity_document_instancetype - -
- string -
-
-
The type of instance. -
-
-
Sample:
-
m4.large
-
-
- ansible_ec2_instance_identity_document_kernelid - -
- string -
-
-
The ID of the kernel launched with this instance, if applicable. -
-
-
-
- ansible_ec2_instance_identity_document_pendingtime - -
- string -
-
-
The instance pending time. -
-
-
Sample:
-
2017-05-11T20:51:20Z
-
-
- ansible_ec2_instance_identity_document_privateip - -
- string -
-
-
The private IPv4 address of the instance. -
-
In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0). -
-
-
Sample:
-
10.0.0.1
-
-
- ansible_ec2_instance_identity_document_ramdiskid - -
- string -
-
-
The ID of the RAM disk specified at launch time, if applicable. -
-
-
-
- ansible_ec2_instance_identity_document_region - -
- string -
-
-
The Region in which the instance launched. -
-
-
Sample:
-
us-east-1
-
-
- ansible_ec2_instance_identity_document_version - -
- string -
-
-
Identity document version. -
-
-
Sample:
-
2010-08-31
-
-
- ansible_ec2_instance_identity_pkcs7 - -
- string -
-
-
Used to verify the document's authenticity and content against the signature. -
-
-
-
- ansible_ec2_instance_identity_rsa2048 - -
- string -
-
-
Used to verify the document's authenticity and content against the signature. -
-
-
-
- ansible_ec2_instance_identity_signature - -
- string -
-
-
Data that can be used by other parties to verify its origin and authenticity. -
-
-
-
- ansible_ec2_instance_type - -
- string -
-
-
The type of instance. -
-
-
Sample:
-
m4.large
-
-
- ansible_ec2_local_hostname - -
- string -
-
-
The private IPv4 DNS hostname of the instance. -
-
In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0). -
-
-
Sample:
-
ip-10-0-0-1.ec2.internal
-
-
- ansible_ec2_local_ipv4 - -
- string -
-
-
The private IPv4 address of the instance. -
-
In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0). -
-
-
Sample:
-
10.0.0.1
-
-
- ansible_ec2_mac - -
- string -
-
-
The instance's media access control (MAC) address. -
-
In cases where multiple network interfaces are present, this refers to the eth0 device (the device for which the device number is 0). -
-
-
Sample:
-
00:11:22:33:44:55
-
-
- ansible_ec2_metrics_vhostmd - -
- string -
-
-
Metrics. -
-
-
-
- ansible_ec2_network_interfaces_macs__device_number - -
- string -
-
-
The unique device number associated with that interface. The device number corresponds to the device name; for example, a device-number of 2 is for the eth2 device. -
-
This category corresponds to the DeviceIndex and device-index fields that are used by the Amazon EC2 API and the EC2 commands for the AWS CLI. -
-
-
Sample:
-
0
-
-
- ansible_ec2_network_interfaces_macs__interface_id - -
- string -
-
-
The elastic network interface ID. -
-
-
Sample:
-
eni-12345678
-
-
- ansible_ec2_network_interfaces_macs__ipv4_associations_ - -
- string -
-
-
The private IPv4 addresses that are associated with each public-ip address and assigned to that interface. -
-
-
-
- ansible_ec2_network_interfaces_macs__ipv6s - -
- string -
-
-
The IPv6 addresses associated with the interface. Returned only for instances launched into a VPC. -
-
-
-
- ansible_ec2_network_interfaces_macs__local_hostname - -
- string -
-
-
The interface's local hostname. -
-
-
-
- ansible_ec2_network_interfaces_macs__local_ipv4s - -
- string -
-
-
The private IPv4 addresses associated with the interface. -
-
-
-
- ansible_ec2_network_interfaces_macs__mac - -
- string -
-
-
The instance's MAC address. -
-
-
Sample:
-
00:11:22:33:44:55
-
-
- ansible_ec2_network_interfaces_macs__owner_id - -
- string -
-
-
The ID of the owner of the network interface. -
-
In multiple-interface environments, an interface can be attached by a third party, such as Elastic Load Balancing. -
-
Traffic on an interface is always billed to the interface owner. -
-
-
Sample:
-
01234567890
-
-
- ansible_ec2_network_interfaces_macs__public_hostname - -
- string -
-
-
The interface's public DNS (IPv4). If the instance is in a VPC, this category is only returned if the enableDnsHostnames attribute is set to true. -
-
-
Sample:
-
ec2-1-2-3-4.compute-1.amazonaws.com
-
-
- ansible_ec2_network_interfaces_macs__public_ipv4s - -
- string -
-
-
The Elastic IP addresses associated with the interface. There may be multiple IPv4 addresses on an instance. -
-
-
Sample:
-
1.2.3.4
-
-
- ansible_ec2_network_interfaces_macs__security_group_ids - -
- string -
-
-
The IDs of the security groups to which the network interface belongs. Returned only for instances launched into a VPC. -
-
-
Sample:
-
sg-01234567,sg-01234568
-
-
- ansible_ec2_network_interfaces_macs__security_groups - -
- string -
-
-
Security groups to which the network interface belongs. Returned only for instances launched into a VPC. -
-
-
Sample:
-
secgroup1,secgroup2
-
-
- ansible_ec2_network_interfaces_macs__subnet_id - -
- string -
-
-
The ID of the subnet in which the interface resides. Returned only for instances launched into a VPC. -
-
-
Sample:
-
subnet-01234567
-
-
- ansible_ec2_network_interfaces_macs__subnet_ipv4_cidr_block - -
- string -
-
-
The IPv4 CIDR block of the subnet in which the interface resides. Returned only for instances launched into a VPC. -
-
-
Sample:
-
10.0.1.0/24
-
-
- ansible_ec2_network_interfaces_macs__subnet_ipv6_cidr_blocks - -
- string -
-
-
The IPv6 CIDR block of the subnet in which the interface resides. Returned only for instances launched into a VPC. -
-
-
-
- ansible_ec2_network_interfaces_macs__vpc_id - -
- string -
-
-
The ID of the VPC in which the interface resides. Returned only for instances launched into a VPC. -
-
-
Sample:
-
vpc-0123456
-
-
- ansible_ec2_network_interfaces_macs__vpc_ipv4_cidr_block - -
- string -
-
-
The IPv4 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. -
-
-
Sample:
-
10.0.0.0/16
-
-
- ansible_ec2_network_interfaces_macs__vpc_ipv4_cidr_blocks - -
- string -
-
-
The IPv4 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. -
-
-
Sample:
-
10.0.0.0/16
-
-
- ansible_ec2_network_interfaces_macs__vpc_ipv6_cidr_blocks - -
- string -
-
-
The IPv6 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. -
-
-
-
- ansible_ec2_placement_availability_zone - -
- string -
-
-
The Availability Zone in which the instance launched. -
-
-
Sample:
-
us-east-1a
-
-
- ansible_ec2_placement_region - -
- string -
-
-
The Region in which the instance launched. -
-
-
Sample:
-
us-east-1
-
-
- ansible_ec2_product_codes - -
- string -
-
-
Product codes associated with the instance, if any. -
-
-
Sample:
-
aw0evgkw8e5c1q413zgy5pjce
-
-
- ansible_ec2_profile - -
- string -
-
-
EC2 instance hardware profile. -
-
-
Sample:
-
default-hvm
-
-
- ansible_ec2_public_hostname - -
- string -
-
-
The instance's public DNS. If the instance is in a VPC, this category is only returned if the enableDnsHostnames attribute is set to true. -
-
-
Sample:
-
ec2-1-2-3-4.compute-1.amazonaws.com
-
-
- ansible_ec2_public_ipv4 - -
- string -
-
-
The public IPv4 address. If an Elastic IP address is associated with the instance, the value returned is the Elastic IP address. -
-
-
Sample:
-
1.2.3.4
-
-
- ansible_ec2_public_key - -
- string -
-
-
Public key. Only available if supplied at instance launch time. -
-
-
-
- ansible_ec2_ramdisk_id - -
- string -
-
-
The ID of the RAM disk specified at launch time, if applicable. -
-
-
-
- ansible_ec2_reservation_id - -
- string -
-
-
The ID of the reservation. -
-
-
Sample:
-
r-0123456789abcdef0
-
-
- ansible_ec2_security_groups - -
- string -
-
-
The names of the security groups applied to the instance. After launch, you can only change the security groups of instances running in a VPC. -
-
Such changes are reflected here and in network/interfaces/macs/mac/security-groups. -
-
-
Sample:
-
securitygroup1,securitygroup2
-
-
- ansible_ec2_services_domain - -
- string -
-
-
The domain for AWS resources for the region; for example, amazonaws.com for us-east-1. -
-
-
Sample:
-
amazonaws.com
-
-
- ansible_ec2_services_partition - -
- string -
-
-
The partition that the resource is in. For standard AWS regions, the partition is aws. -
-
If you have resources in other partitions, the partition is aws-partitionname. -
-
For example, the partition for resources in the China (Beijing) region is aws-cn. -
-
-
Sample:
-
aws
-
-
- ansible_ec2_spot_termination_time - -
- string -
-
-
The approximate time, in UTC, that the operating system for your Spot instance will receive the shutdown signal. -
-
This item is present and contains a time value only if the Spot instance has been marked for termination by Amazon EC2. -
-
The termination-time item is not set to a time if you terminated the Spot instance yourself. -
-
-
Sample:
-
2015-01-05T18:02:00Z
-
-
- ansible_ec2_user_data - -
- string -
-
-
The instance user data. -
-
-
Sample:
-
#!/bin/bash
-
-

- - - -Status ------- - - -Authors -~~~~~~~ - -- Silviu Dicu (@silviud) -- Vinay Dandekar (@roadmapper) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_snapshot.rst b/docs/amazon.aws.ec2_snapshot.rst deleted file mode 100644 index 16dac33e478..00000000000 --- a/docs/amazon.aws.ec2_snapshot.rst +++ /dev/null @@ -1,501 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_snapshot_module: - - -*********************** -amazon.aws.ec2_snapshot -*********************** - -**Creates a snapshot from an existing volume** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates an EC2 snapshot from an existing EBS volume. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 2.6 -- boto - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- description - -
- string -
-
- -
Description to be applied to the snapshot.
-
-
- device_name - -
- string -
-
- -
Device name of a mounted volume to be snapshotted.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- instance_id - -
- string -
-
- -
Instance that has the required volume to snapshot mounted.
-
-
- last_snapshot_min_age - -
- integer -
-
- Default:
0
-
-
If the volume's most recent snapshot has started less than `last_snapshot_min_age' minutes ago, a new snapshot will not be created.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- snapshot_id - -
- string -
-
- -
Snapshot id to remove.
-
-
- snapshot_tags - -
- dictionary -
-
- -
A dictionary of tags to add to the snapshot.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether to add or create a snapshot.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- volume_id - -
- string -
-
- -
Volume from which to take the snapshot.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Wait for the snapshot to be ready.
-
-
- wait_timeout - -
- integer -
-
- Default:
0
-
-
How long before wait gives up, in seconds.
-
Specify 0 to wait forever.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Simple snapshot of volume using volume_id - - amazon.aws.ec2_snapshot: - volume_id: vol-abcdef12 - description: snapshot of /data from DB123 taken 2013/11/28 12:18:32 - - # Snapshot of volume mounted on device_name attached to instance_id - - amazon.aws.ec2_snapshot: - instance_id: i-12345678 - device_name: /dev/sdb1 - description: snapshot of /data from DB123 taken 2013/11/28 12:18:32 - - # Snapshot of volume with tagging - - amazon.aws.ec2_snapshot: - instance_id: i-12345678 - device_name: /dev/sdb1 - snapshot_tags: - frequency: hourly - source: /data - - # Remove a snapshot - - amazon.aws.ec2_snapshot: - snapshot_id: snap-abcd1234 - state: absent - - # Create a snapshot only if the most recent one is older than 1 hour - - amazon.aws.ec2_snapshot: - volume_id: vol-abcdef12 - last_snapshot_min_age: 60 - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- snapshot_id - -
- string -
-
always -
The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
-
-
Sample:
-
snap-01234567
-
-
- tags - -
- dictionary -
-
always -
Any tags assigned to the snapshot.
-
-
Sample:
-
{ 'Name': 'instance-name' }
-
-
- volume_id - -
- string -
-
always -
The ID of the volume that was used to create the snapshot.
-
-
Sample:
-
vol-01234567
-
-
- volume_size - -
- integer -
-
always -
The size of the volume, in GiB.
-
-
Sample:
-
8
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Will Thames (@willthames) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_snapshot_info.rst b/docs/amazon.aws.ec2_snapshot_info.rst deleted file mode 100644 index 8b6510ba998..00000000000 --- a/docs/amazon.aws.ec2_snapshot_info.rst +++ /dev/null @@ -1,582 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_snapshot_info_module: - - -**************************** -amazon.aws.ec2_snapshot_info -**************************** - -**Gather information about ec2 volume snapshots in AWS** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 volume snapshots in AWS. -- This module was called ``ec2_snapshot_facts`` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- filters - -
- dictionary -
-
- Default:
{}
-
-
A dict of filters to apply. Each dict item consists of a filter key and a filter value. See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSnapshots.html for possible filters. Filter names and values are case sensitive.
-
-
- owner_ids - -
- list - / elements=string
-
- Default:
[]
-
-
If you specify one or more snapshot owners, only snapshots from the specified owners and for which you have access are returned.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- restorable_by_user_ids - -
- list - / elements=string
-
- Default:
[]
-
-
If you specify a list of restorable users, only snapshots with create snapshot permissions for those users are returned.
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- snapshot_ids - -
- list - / elements=string
-
- Default:
[]
-
-
If you specify one or more snapshot IDs, only snapshots that have the specified IDs are returned.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - By default, the module will return all snapshots, including public ones. To limit results to snapshots owned by the account use the filter 'owner-id'. - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Gather information about all snapshots, including public ones - - amazon.aws.ec2_snapshot_info: - - # Gather information about all snapshots owned by the account 0123456789 - - amazon.aws.ec2_snapshot_info: - filters: - owner-id: 0123456789 - - # Or alternatively... - - amazon.aws.ec2_snapshot_info: - owner_ids: - - 0123456789 - - # Gather information about a particular snapshot using ID - - amazon.aws.ec2_snapshot_info: - filters: - snapshot-id: snap-00112233 - - # Or alternatively... - - amazon.aws.ec2_snapshot_info: - snapshot_ids: - - snap-00112233 - - # Gather information about any snapshot with a tag key Name and value Example - - amazon.aws.ec2_snapshot_info: - filters: - "tag:Name": Example - - # Gather information about any snapshot with an error status - - amazon.aws.ec2_snapshot_info: - filters: - status: error - - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- data_encryption_key_id - -
- string -
-
always -
The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy.
-
-
Sample:
-
arn:aws:kms:ap-southeast-2:012345678900:key/74c9742a-a1b2-45cb-b3fe-abcdef123456
-
-
- description - -
- string -
-
always -
The description for the snapshot.
-
-
Sample:
-
My important backup
-
-
- encrypted - -
- boolean -
-
always -
Indicates whether the snapshot is encrypted.
-
-
Sample:
-
True
-
-
- kms_key_id - -
- string -
-
always -
The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the parent volume.
-
-
Sample:
-
74c9742a-a1b2-45cb-b3fe-abcdef123456
-
-
- owner_alias - -
- string -
-
always -
The AWS account alias (for example, amazon, self) or AWS account ID that owns the snapshot.
-
-
Sample:
-
033440102211
-
-
- owner_id - -
- string -
-
always -
The AWS account ID of the EBS snapshot owner.
-
-
Sample:
-
099720109477
-
-
- progress - -
- string -
-
always -
The progress of the snapshot, as a percentage.
-
-
Sample:
-
100%
-
-
- snapshot_id - -
- string -
-
always -
The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
-
-
Sample:
-
snap-01234567
-
-
- start_time - -
- string -
-
always -
The time stamp when the snapshot was initiated.
-
-
Sample:
-
2015-02-12T02:14:02+00:00
-
-
- state - -
- string -
-
always -
The snapshot state (completed, pending or error).
-
-
Sample:
-
completed
-
-
- state_message - -
- string -
-
always -
Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred.
-
-
-
- tags - -
- dictionary -
-
always -
Any tags assigned to the snapshot.
-
-
Sample:
-
{ 'my_tag_key': 'my_tag_value' }
-
-
- volume_id - -
- string -
-
always -
The ID of the volume that was used to create the snapshot.
-
-
Sample:
-
vol-01234567
-
-
- volume_size - -
- integer -
-
always -
The size of the volume, in GiB.
-
-
Sample:
-
8
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_tag.rst b/docs/amazon.aws.ec2_tag.rst deleted file mode 100644 index 00d732d6093..00000000000 --- a/docs/amazon.aws.ec2_tag.rst +++ /dev/null @@ -1,410 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_tag_module: - - -****************** -amazon.aws.ec2_tag -****************** - -**create and remove tags on ec2 resources** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates, modifies and removes tags for any EC2 resource. -- Resources are referenced by their resource id (for example, an instance being i-XXXXXXX, a VPC being vpc-XXXXXXX). -- This module is designed to be used with complex args (tags), see the examples. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- purge_tags - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether unspecified tags should be removed from the resource.
-
Note that when combined with state=absent, specified tags with non-matching values are not purged.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- resource - -
- string - / required
-
- -
The EC2 resource id.
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
  • list
  • -
-
-
Whether the tags should be present or absent on the resource.
-
The use of state=list to interrogate the tags of an instance has been deprecated and will be removed after 2022-06-01. The 'list' functionality has been moved to a dedicated module ec2_tag_info.
-
-
- tags - -
- dictionary -
-
- -
A dictionary of tags to add or remove from the resource.
-
If the value provided for a key is not set and state=absent, the tag will be removed regardless of its current value.
-
Required when state=present or state=absent.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - - name: Ensure tags are present on a resource - amazon.aws.ec2_tag: - region: eu-west-1 - resource: vol-XXXXXX - state: present - tags: - Name: ubervol - env: prod - - - name: Ensure all volumes are tagged - amazon.aws.ec2_tag: - region: eu-west-1 - resource: '{{ item.id }}' - state: present - tags: - Name: dbserver - Env: production - loop: '{{ ec2_vol.volumes }}' - - - name: Remove the Env tag - amazon.aws.ec2_tag: - region: eu-west-1 - resource: i-xxxxxxxxxxxxxxxxx - tags: - Env: - state: absent - - - name: Remove the Env tag if it's currently 'development' - amazon.aws.ec2_tag: - region: eu-west-1 - resource: i-xxxxxxxxxxxxxxxxx - tags: - Env: development - state: absent - - - name: Remove all tags except for Name from an instance - amazon.aws.ec2_tag: - region: eu-west-1 - resource: i-xxxxxxxxxxxxxxxxx - tags: - Name: '' - state: absent - purge_tags: true - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- added_tags - -
- dictionary -
-
If tags were added -
A dict of tags that were added to the resource
-
-
-
- removed_tags - -
- dictionary -
-
If tags were removed -
A dict of tags that were removed from the resource
-
-
-
- tags - -
- dictionary -
-
always -
A dict containing the tags on the resource
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Lester Wade (@lwade) -- Paul Arthur (@flowerysong) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_tag_info.rst b/docs/amazon.aws.ec2_tag_info.rst deleted file mode 100644 index 00cdbe0a040..00000000000 --- a/docs/amazon.aws.ec2_tag_info.rst +++ /dev/null @@ -1,289 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_tag_info_module: - - -*********************** -amazon.aws.ec2_tag_info -*********************** - -**list tags on ec2 resources** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Lists tags for any EC2 resource. -- Resources are referenced by their resource id (e.g. an instance being i-XXXXXXX, a vpc being vpc-XXXXXX). -- Resource tags can be managed using the :ref:`ec2_tag ` module. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- resource - -
- string - / required
-
- -
The EC2 resource id (for example i-XXXXXX or vpc-XXXXXX).
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - - name: Retrieve all tags on an instance - amazon.aws.ec2_tag_info: - region: eu-west-1 - resource: i-xxxxxxxxxxxxxxxxx - register: instance_tags - - - name: Retrieve all tags on a VPC - amazon.aws.ec2_tag_info: - region: eu-west-1 - resource: vpc-xxxxxxxxxxxxxxxxx - register: vpc_tags - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- tags - -
- dictionary -
-
always -
A dict containing the tags on the resource
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Mark Chappell (@tremble) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_vol.rst b/docs/amazon.aws.ec2_vol.rst deleted file mode 100644 index 4ddfa92085e..00000000000 --- a/docs/amazon.aws.ec2_vol.rst +++ /dev/null @@ -1,627 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_vol_module: - - -****************** -amazon.aws.ec2_vol -****************** - -**Create and attach a volume, return volume id and device map** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates an EBS volume and optionally attaches it to an instance. -- If both *instance* and *name* are given and the instance has a device at the device name, then no volume is created and no attachment is made. -- This module has a dependency on python-boto. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 2.6 -- boto - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- delete_on_termination - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
When set to true, the volume will be deleted upon instance termination.
-
-
- device_name - -
- string -
-
- -
Device id to override device mapping. Assumes /dev/sdf for Linux/UNIX and /dev/xvdf for Windows.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- encrypted - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable encryption at rest for this volume.
-
-
- id - -
- string -
-
- -
Volume id if you wish to attach an existing volume (requires instance) or remove an existing volume
-
-
- instance - -
- string -
-
- -
Instance ID if you wish to attach the volume. Since 1.9 you can set to None to detach.
-
-
- iops - -
- integer -
-
- -
The provisioned IOPs you want to associate with this volume (integer).
-
By default AWS will set this to 100.
-
-
- kms_key_id - -
- string -
-
- -
Specify the id of the KMS key to use.
-
-
- name - -
- string -
-
- -
Volume Name tag if you wish to attach an existing volume (requires instance)
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- snapshot - -
- string -
-
- -
Snapshot ID on which to base the volume.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
  • list
  • -
-
-
Whether to ensure the volume is present or absent, or to list existing volumes (The list option was added in version 1.8).
-
-
- tags - -
- dictionary -
-
- Default:
{}
-
-
tag:value pairs to add to the volume after creation.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- volume_size - -
- integer -
-
- -
Size of volume (in GiB) to create.
-
-
- volume_type - -
- string -
-
-
    Choices: -
  • standard ←
  • -
  • gp2
  • -
  • io1
  • -
  • st1
  • -
  • sc1
  • -
-
-
Type of EBS volume; standard (magnetic), gp2 (SSD), io1 (Provisioned IOPS), st1 (Throughput Optimized HDD), sc1 (Cold HDD). "Standard" is the old EBS default and continues to remain the Ansible default for backwards compatibility.
-
-
- zone - -
- string -
-
- -
Zone in which to create the volume, if unset uses the zone the instance is in (if set).
-

aliases: availability_zone, aws_zone, ec2_zone
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Simple attachment action - - amazon.aws.ec2_vol: - instance: XXXXXX - volume_size: 5 - device_name: sdd - - # Example using custom iops params - - amazon.aws.ec2_vol: - instance: XXXXXX - volume_size: 5 - iops: 100 - device_name: sdd - - # Example using snapshot id - - amazon.aws.ec2_vol: - instance: XXXXXX - snapshot: "{{ snapshot }}" - - # Playbook example combined with instance launch - - amazon.aws.ec2: - keypair: "{{ keypair }}" - image: "{{ image }}" - wait: yes - count: 3 - register: ec2 - - amazon.aws.ec2_vol: - instance: "{{ item.id }}" - volume_size: 5 - loop: "{{ ec2.instances }}" - register: ec2_vol - - # Example: Launch an instance and then add a volume if not already attached - # * Volume will be created with the given name if not already created. - # * Nothing will happen if the volume is already attached. - # * Requires Ansible 2.0 - - - amazon.aws.ec2: - keypair: "{{ keypair }}" - image: "{{ image }}" - zone: YYYYYY - id: my_instance - wait: yes - count: 1 - register: ec2 - - - amazon.aws.ec2_vol: - instance: "{{ item.id }}" - name: my_existing_volume_Name_tag - device_name: /dev/xvdf - loop: "{{ ec2.instances }}" - register: ec2_vol - - # Remove a volume - - amazon.aws.ec2_vol: - id: vol-XXXXXXXX - state: absent - - # Detach a volume (since 1.9) - - amazon.aws.ec2_vol: - id: vol-XXXXXXXX - instance: None - - # List volumes for an instance - - amazon.aws.ec2_vol: - instance: i-XXXXXX - state: list - - # Create new volume using SSD storage - - amazon.aws.ec2_vol: - instance: XXXXXX - volume_size: 50 - volume_type: gp2 - device_name: /dev/xvdf - - # Attach an existing volume to instance. The volume will be deleted upon instance termination. - - amazon.aws.ec2_vol: - instance: XXXXXX - id: XXXXXX - device_name: /dev/sdf - delete_on_termination: yes - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- device - -
- string -
-
when success -
device name of attached volume
-
-
Sample:
-
/def/sdf
-
-
- volume - -
- string -
-
when success -
a dictionary containing detailed attributes of the volume
-
-
Sample:
-
{'attachment_set': {'attach_time': '2015-10-23T00:22:29.000Z', 'deleteOnTermination': 'false', 'device': '/dev/sdf', 'instance_id': 'i-8356263c', 'status': 'attached'}, 'create_time': '2015-10-21T14:36:08.870Z', 'encrypted': False, 'id': 'vol-35b333d9', 'iops': None, 'size': 1, 'snapshot_id': '', 'status': 'in-use', 'tags': {'env': 'dev'}, 'type': 'standard', 'zone': 'us-east-1b'}
-
-
- volume_id - -
- string -
-
when success -
the id of volume
-
-
Sample:
-
vol-35b333d9
-
-
- volume_type - -
- string -
-
when success -
the volume type
-
-
Sample:
-
standard
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Lester Wade (@lwade) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_vol_info.rst b/docs/amazon.aws.ec2_vol_info.rst deleted file mode 100644 index c5f6ed9fa91..00000000000 --- a/docs/amazon.aws.ec2_vol_info.rst +++ /dev/null @@ -1,267 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_vol_info_module: - - -*********************** -amazon.aws.ec2_vol_info -*********************** - -**Gather information about ec2 volumes in AWS** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 volumes in AWS. -- This module was called ``ec2_vol_facts`` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- filters - -
- dictionary -
-
- -
A dict of filters to apply. Each dict item consists of a filter key and a filter value.
- -
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Gather information about all volumes - - amazon.aws.ec2_vol_info: - - # Gather information about a particular volume using volume ID - - amazon.aws.ec2_vol_info: - filters: - volume-id: vol-00112233 - - # Gather information about any volume with a tag key Name and value Example - - amazon.aws.ec2_vol_info: - filters: - "tag:Name": Example - - # Gather information about any volume that is attached - - amazon.aws.ec2_vol_info: - filters: - attachment.status: attached - - - - - - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_vpc_dhcp_option.rst b/docs/amazon.aws.ec2_vpc_dhcp_option.rst deleted file mode 100644 index 172d01d6046..00000000000 --- a/docs/amazon.aws.ec2_vpc_dhcp_option.rst +++ /dev/null @@ -1,529 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_vpc_dhcp_option_module: - - -****************************** -amazon.aws.ec2_vpc_dhcp_option -****************************** - -**Manages DHCP Options, and can ensure the DHCP options for the given VPC match what's requested** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- This module removes, or creates DHCP option sets, and can associate them to a VPC. Optionally, a new DHCP Options set can be created that converges a VPC's existing DHCP option set with values provided. When dhcp_options_id is provided, the module will 1. remove (with state='absent') 2. ensure tags are applied (if state='present' and tags are provided 3. attach it to a VPC (if state='present' and a vpc_id is provided. If any of the optional values are missing, they will either be treated as a no-op (i.e., inherit what already exists for the VPC) To remove existing options while inheriting, supply an empty value (e.g. set ntp_servers to [] if you want to remove them from the VPC's options) Most of the options should be self-explanatory. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- delete_old - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether to delete the old VPC DHCP option set when associating a new one. This is primarily useful for debugging/development purposes when you want to quickly roll back to the old option set. Note that this setting will be ignored, and the old DHCP option set will be preserved, if it is in use by any other VPC. (Otherwise, AWS will return an error.)
-
-
- dhcp_options_id - -
- string -
-
- -
The resource_id of an existing DHCP options set. If this is specified, then it will override other settings, except tags (which will be updated to match)
-
-
- dns_servers - -
- list - / elements=string
-
- -
A list of hosts to set the DNS servers for the VPC to. (Should be a list of IP addresses rather than host names.)
-
-
- domain_name - -
- string -
-
- -
The domain name to set in the DHCP option sets
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- inherit_existing - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
For any DHCP options not specified in these parameters, whether to inherit them from the options set already applied to vpc_id, or to reset them to be empty.
-
-
- netbios_name_servers - -
- list - / elements=string
-
- -
List of hosts to advertise as NetBIOS servers.
-
-
- netbios_node_type - -
- integer -
-
- -
NetBIOS node type to advertise in the DHCP options. The AWS recommendation is to use 2 (when using netbios name services) https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_DHCP_Options.html
-
-
- ntp_servers - -
- list - / elements=string
-
- -
List of hosts to advertise as NTP servers for the VPC.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
create/assign or remove the DHCP options. If state is set to absent, then a DHCP options set matched either by id, or tags and options will be removed if possible.
-
-
- tags - -
- dictionary -
-
- -
Tags to be applied to a VPC options set if a new one is created, or if the resource_id is provided. (options must match)
-

aliases: resource_tags
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- vpc_id - -
- string -
-
- -
VPC ID to associate with the requested DHCP option set. If no vpc id is provided, and no matching option set is found then a new DHCP option set is created.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Completely overrides the VPC DHCP options associated with VPC vpc-123456 and deletes any existing - # DHCP option set that may have been attached to that VPC. - - amazon.aws.ec2_vpc_dhcp_option: - domain_name: "foo.example.com" - region: us-east-1 - dns_servers: - - 10.0.0.1 - - 10.0.1.1 - ntp_servers: - - 10.0.0.2 - - 10.0.1.2 - netbios_name_servers: - - 10.0.0.1 - - 10.0.1.1 - netbios_node_type: 2 - vpc_id: vpc-123456 - delete_old: True - inherit_existing: False - - - # Ensure the DHCP option set for the VPC has 10.0.0.4 and 10.0.1.4 as the specified DNS servers, but - # keep any other existing settings. Also, keep the old DHCP option set around. - - amazon.aws.ec2_vpc_dhcp_option: - region: us-east-1 - dns_servers: - - "{{groups['dns-primary']}}" - - "{{groups['dns-secondary']}}" - vpc_id: vpc-123456 - inherit_existing: True - delete_old: False - - - ## Create a DHCP option set with 4.4.4.4 and 8.8.8.8 as the specified DNS servers, with tags - ## but do not assign to a VPC - - amazon.aws.ec2_vpc_dhcp_option: - region: us-east-1 - dns_servers: - - 4.4.4.4 - - 8.8.8.8 - tags: - Name: google servers - Environment: Test - - ## Delete a DHCP options set that matches the tags and options specified - - amazon.aws.ec2_vpc_dhcp_option: - region: us-east-1 - dns_servers: - - 4.4.4.4 - - 8.8.8.8 - tags: - Name: google servers - Environment: Test - state: absent - - ## Associate a DHCP options set with a VPC by ID - - amazon.aws.ec2_vpc_dhcp_option: - region: us-east-1 - dhcp_options_id: dopt-12345678 - vpc_id: vpc-123456 - - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- changed - -
- boolean -
-
always -
Whether the dhcp options were changed
-
-
-
- dhcp_options_id - -
- string -
-
when available -
The aws resource id of the primary DCHP options set created, found or removed
-
-
-
- new_options - -
- dictionary -
-
when appropriate -
The DHCP options created, associated or found
-
-
Sample:
-
{'domain-name-servers': ['10.0.0.1', '10.0.1.1'], 'netbois-name-servers': ['10.0.0.1', '10.0.1.1'], 'netbios-node-type': 2, 'domain-name': 'my.example.com'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Joel Thompson (@joelthompson) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_vpc_dhcp_option_info.rst b/docs/amazon.aws.ec2_vpc_dhcp_option_info.rst deleted file mode 100644 index de2fdee4f97..00000000000 --- a/docs/amazon.aws.ec2_vpc_dhcp_option_info.rst +++ /dev/null @@ -1,350 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_vpc_dhcp_option_info_module: - - -*********************************** -amazon.aws.ec2_vpc_dhcp_option_info -*********************************** - -**Gather information about dhcp options sets in AWS** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about dhcp options sets in AWS -- This module was called ``ec2_vpc_dhcp_option_facts`` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- dhcp_options_ids - -
- list - / elements=string
-
- -
Get details of specific DHCP Option IDs.
-

aliases: DhcpOptionIds
-
-
- dry_run - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Checks whether you have the required permissions to view the DHCP Options.
-

aliases: DryRun
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- filters - -
- dictionary -
-
- -
A dict of filters to apply. Each dict item consists of a filter key and a filter value. See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeDhcpOptions.html for possible filters.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Gather information about all DHCP Option sets for an account or profile - amazon.aws.ec2_vpc_dhcp_option_info: - region: ap-southeast-2 - profile: production - register: dhcp_info - - - name: Gather information about a filtered list of DHCP Option sets - amazon.aws.ec2_vpc_dhcp_option_info: - region: ap-southeast-2 - profile: production - filters: - "tag:Name": "abc-123" - register: dhcp_info - - - name: Gather information about a specific DHCP Option set by DhcpOptionId - amazon.aws.ec2_vpc_dhcp_option_info: - region: ap-southeast-2 - profile: production - DhcpOptionsIds: dopt-123fece2 - register: dhcp_info - - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- changed - -
- boolean -
-
always -
True if listing the dhcp options succeeds
-
-
-
- dhcp_options - -
- list -
-
always -
The dhcp option sets for the account
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Nick Aslanidis (@naslanidis) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_vpc_net.rst b/docs/amazon.aws.ec2_vpc_net.rst deleted file mode 100644 index bed2f207f6d..00000000000 --- a/docs/amazon.aws.ec2_vpc_net.rst +++ /dev/null @@ -1,670 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_vpc_net_module: - - -********************** -amazon.aws.ec2_vpc_net -********************** - -**Configure AWS virtual private clouds** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Create, modify, and terminate AWS virtual private clouds. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- cidr_block - -
- list - / elements=string / required
-
- -
The primary CIDR of the VPC. After 2.5 a list of CIDRs can be provided. The first in the list will be used as the primary CIDR and is used in conjunction with the name to ensure idempotence.
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- dhcp_opts_id - -
- string -
-
- -
The id of the DHCP options to use for this VPC.
-
-
- dns_hostnames - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether to enable AWS hostname support.
-
-
- dns_support - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether to enable AWS DNS support.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- ipv6_cidr - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Request an Amazon-provided IPv6 CIDR block with /56 prefix length. You cannot specify the range of IPv6 addresses, or the size of the CIDR block.
-
-
- multi_ok - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
By default the module will not create another VPC if there is another VPC with the same name and CIDR block. Specify this as true if you want duplicate VPCs created.
-
-
- name - -
- string - / required
-
- -
The name to give your VPC. This is used in combination with cidr_block to determine if a VPC already exists.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- purge_cidrs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Remove CIDRs that are associated with the VPC and are not specified in cidr_block.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
The state of the VPC. Either absent or present.
-
-
- tags - -
- dictionary -
-
- -
The tags you want attached to the VPC. This is independent of the name value, note if you pass a 'Name' key it would override the Name of the VPC if it's different.
-

aliases: resource_tags
-
-
- tenancy - -
- string -
-
-
    Choices: -
  • default ←
  • -
  • dedicated
  • -
-
-
Whether to be default or dedicated tenancy. This cannot be changed after the VPC has been created.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: create a VPC with dedicated tenancy and a couple of tags - amazon.aws.ec2_vpc_net: - name: Module_dev2 - cidr_block: 10.10.0.0/16 - region: us-east-1 - tags: - module: ec2_vpc_net - this: works - tenancy: dedicated - - - name: create a VPC with dedicated tenancy and request an IPv6 CIDR - amazon.aws.ec2_vpc_net: - name: Module_dev2 - cidr_block: 10.10.0.0/16 - ipv6_cidr: True - region: us-east-1 - tenancy: dedicated - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- vpc - -
- complex -
-
always -
info about the VPC that was created or deleted
-
-
  -
- cidr_block - -
- string -
-
always -
The CIDR of the VPC
-
-
Sample:
-
10.0.0.0/16
-
  -
- cidr_block_association_set - -
- list -
-
success -
IPv4 CIDR blocks associated with the VPC
-
-
Sample:
-
{'cidr_block_association_set': [{'association_id': 'vpc-cidr-assoc-97aeeefd', 'cidr_block': '20.0.0.0/24', 'cidr_block_state': {'state': 'associated'}}]}
-
  -
- classic_link_enabled - -
- boolean -
-
always -
indicates whether ClassicLink is enabled
-
-
  -
- dhcp_options_id - -
- string -
-
always -
the id of the DHCP options associated with this VPC
-
-
Sample:
-
dopt-0fb8bd6b
-
  -
- id - -
- string -
-
always -
VPC resource id
-
-
Sample:
-
vpc-c2e00da5
-
  -
- instance_tenancy - -
- string -
-
always -
indicates whether VPC uses default or dedicated tenancy
-
-
Sample:
-
default
-
  -
- ipv6_cidr_block_association_set - -
- list -
-
success -
IPv6 CIDR blocks associated with the VPC
-
-
Sample:
-
{'ipv6_cidr_block_association_set': [{'association_id': 'vpc-cidr-assoc-97aeeefd', 'ipv6_cidr_block': '2001:db8::/56', 'ipv6_cidr_block_state': {'state': 'associated'}}]}
-
  -
- is_default - -
- boolean -
-
always -
indicates whether this is the default VPC
-
-
  -
- state - -
- string -
-
always -
state of the VPC
-
-
Sample:
-
available
-
  -
- tags - -
- complex -
-
always -
tags attached to the VPC, includes name
-
-
   -
- Name - -
- string -
-
always -
name tag for the VPC
-
-
Sample:
-
pk_vpc4
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jonathan Davila (@defionscode) -- Sloane Hertel (@s-hertel) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_vpc_net_info.rst b/docs/amazon.aws.ec2_vpc_net_info.rst deleted file mode 100644 index f7ac6b8d4e2..00000000000 --- a/docs/amazon.aws.ec2_vpc_net_info.rst +++ /dev/null @@ -1,657 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_vpc_net_info_module: - - -*************************** -amazon.aws.ec2_vpc_net_info -*************************** - -**Gather information about ec2 VPCs in AWS** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 VPCs in AWS -- This module was called ``ec2_vpc_net_facts`` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- filters - -
- dictionary -
-
- -
A dict of filters to apply. Each dict item consists of a filter key and a filter value. See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeVpcs.html for possible filters.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- vpc_ids - -
- list - / elements=string
-
- -
A list of VPC IDs that exist in your account.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Gather information about all VPCs - - amazon.aws.ec2_vpc_net_info: - - # Gather information about a particular VPC using VPC ID - - amazon.aws.ec2_vpc_net_info: - vpc_ids: vpc-00112233 - - # Gather information about any VPC with a tag key Name and value Example - - amazon.aws.ec2_vpc_net_info: - filters: - "tag:Name": Example - - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- vpcs - -
- complex -
-
success -
Returns an array of complex objects as described below.
-
-
  -
- cidr_block - -
- string -
-
always -
The IPv4 CIDR block assigned to the VPC.
-
-
  -
- cidr_block_association_set - -
- complex -
-
always -
An array of IPv4 cidr block association set information.
-
-
   -
- association_id - -
- string -
-
always -
The association ID
-
-
   -
- cidr_block - -
- string -
-
always -
The IPv4 CIDR block that is associated with the VPC.
-
-
   -
- cidr_block_state - -
- dictionary -
-
always -
A hash/dict that contains a single item. The state of the cidr block association.
-
-
    -
- state - -
- string -
-
always -
The CIDR block association state.
-
-
  -
- classic_link_dns_supported - -
- boolean -
-
always -
True/False depending on attribute setting for classic link DNS support.
-
-
  -
- classic_link_enabled - -
- boolean -
-
always -
True/False depending on if classic link support is enabled.
-
-
  -
- enable_dns_hostnames - -
- boolean -
-
always -
True/False depending on attribute setting for DNS hostnames support.
-
-
  -
- enable_dns_support - -
- boolean -
-
always -
True/False depending on attribute setting for DNS support.
-
-
  -
- id - -
- string -
-
always -
The ID of the VPC (for backwards compatibility).
-
-
  -
- instance_tenancy - -
- string -
-
always -
The instance tenancy setting for the VPC.
-
-
  -
- ipv6_cidr_block_association_set - -
- complex -
-
always -
An array of IPv6 cidr block association set information.
-
-
   -
- association_id - -
- string -
-
always -
The association ID
-
-
   -
- ipv6_cidr_block - -
- string -
-
always -
The IPv6 CIDR block that is associated with the VPC.
-
-
   -
- ipv6_cidr_block_state - -
- dictionary -
-
always -
A hash/dict that contains a single item. The state of the cidr block association.
-
-
    -
- state - -
- string -
-
always -
The CIDR block association state.
-
-
  -
- is_default - -
- boolean -
-
always -
True if this is the default VPC for account.
-
-
  -
- state - -
- string -
-
always -
The state of the VPC.
-
-
  -
- tags - -
- dictionary -
-
always -
A dict of tags associated with the VPC.
-
-
  -
- vpc_id - -
- string -
-
always -
The ID of the VPC .
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_vpc_subnet.rst b/docs/amazon.aws.ec2_vpc_subnet.rst deleted file mode 100644 index a3b4d8b6fdc..00000000000 --- a/docs/amazon.aws.ec2_vpc_subnet.rst +++ /dev/null @@ -1,777 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_vpc_subnet_module: - - -************************* -amazon.aws.ec2_vpc_subnet -************************* - -**Manage subnets in AWS virtual private clouds** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage subnets in AWS virtual private clouds. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- assign_instances_ipv6 - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Specify yes to indicate that instances launched into the subnet should be automatically assigned an IPv6 address.
-
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- az - -
- string -
-
- -
The availability zone for the subnet.
-
-
- cidr - -
- string - / required
-
- -
The CIDR block for the subnet. E.g. 192.0.2.0/24.
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- ipv6_cidr - -
- string -
-
- -
The IPv6 CIDR block for the subnet. The VPC must have a /56 block assigned and this value must be a valid IPv6 /64 that falls in the VPC range.
-
Required if assign_instances_ipv6=true
-
-
- map_public - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Specify yes to indicate that instances launched into the subnet should be assigned public IP address by default.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- purge_tags - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to remove tags that do not appear in the tags list.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Create or remove the subnet.
-
-
- tags - -
- dictionary -
-
- -
A dict of tags to apply to the subnet. Any tags currently applied to the subnet and not present here will be removed.
-

aliases: resource_tags
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- vpc_id - -
- string - / required
-
- -
VPC ID of the VPC in which to create or delete the subnet.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When wait=true and state=present, module will wait for subnet to be in available state before continuing.
-
-
- wait_timeout - -
- integer -
-
- Default:
300
-
-
Number of seconds to wait for subnet to become available wait=True.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Create subnet for database servers - amazon.aws.ec2_vpc_subnet: - state: present - vpc_id: vpc-123456 - cidr: 10.0.1.16/28 - tags: - Name: Database Subnet - register: database_subnet - - - name: Remove subnet for database servers - amazon.aws.ec2_vpc_subnet: - state: absent - vpc_id: vpc-123456 - cidr: 10.0.1.16/28 - - - name: Create subnet with IPv6 block assigned - amazon.aws.ec2_vpc_subnet: - state: present - vpc_id: vpc-123456 - cidr: 10.1.100.0/24 - ipv6_cidr: 2001:db8:0:102::/64 - - - name: Remove IPv6 block assigned to subnet - amazon.aws.ec2_vpc_subnet: - state: present - vpc_id: vpc-123456 - cidr: 10.1.100.0/24 - ipv6_cidr: '' - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- subnet - -
- complex -
-
state=present -
Dictionary of subnet values
-
-
  -
- assign_ipv6_address_on_creation - -
- boolean -
-
state=present -
whether IPv6 address is auto-assigned to new instances
-
-
  -
- availability_zone - -
- string -
-
state=present -
Availability zone of the Subnet
-
-
Sample:
-
us-east-1a
-
  -
- available_ip_address_count - -
- string -
-
state=present -
number of available IPv4 addresses
-
-
Sample:
-
251
-
  -
- cidr_block - -
- string -
-
state=present -
The IPv4 CIDR of the Subnet
-
-
Sample:
-
10.0.0.0/16
-
  -
- default_for_az - -
- boolean -
-
state=present -
indicates whether this is the default Subnet for this Availability Zone
-
-
  -
- id - -
- string -
-
state=present -
Subnet resource id
-
-
Sample:
-
subnet-b883b2c4
-
  -
- ipv6_association_id - -
- string -
-
state=present -
The IPv6 association ID for the currently associated CIDR
-
-
Sample:
-
subnet-cidr-assoc-b85c74d2
-
  -
- ipv6_cidr_block - -
- string -
-
state=present -
The IPv6 CIDR block actively associated with the Subnet
-
-
Sample:
-
2001:db8:0:102::/64
-
  -
- ipv6_cidr_block_association_set - -
- complex -
-
state=present -
An array of IPv6 cidr block association set information.
-
-
   -
- association_id - -
- string -
-
always -
The association ID
-
-
   -
- ipv6_cidr_block - -
- string -
-
always -
The IPv6 CIDR block that is associated with the subnet.
-
-
   -
- ipv6_cidr_block_state - -
- dictionary -
-
always -
A hash/dict that contains a single item. The state of the cidr block association.
-
-
    -
- state - -
- string -
-
always -
The CIDR block association state.
-
-
  -
- map_public_ip_on_launch - -
- boolean -
-
state=present -
whether public IP is auto-assigned to new instances
-
-
  -
- state - -
- string -
-
state=present -
state of the Subnet
-
-
Sample:
-
available
-
  -
- tags - -
- dictionary -
-
state=present -
tags attached to the Subnet, includes name
-
-
Sample:
-
{'Name': 'My Subnet', 'env': 'staging'}
-
  -
- vpc_id - -
- string -
-
state=present -
the id of the VPC where this Subnet exists
-
-
Sample:
-
vpc-67236184
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Robert Estelle (@erydo) -- Brad Davidson (@brandond) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.ec2_vpc_subnet_info.rst b/docs/amazon.aws.ec2_vpc_subnet_info.rst deleted file mode 100644 index 61ddcd24838..00000000000 --- a/docs/amazon.aws.ec2_vpc_subnet_info.rst +++ /dev/null @@ -1,592 +0,0 @@ -:orphan: - -.. _amazon.aws.ec2_vpc_subnet_info_module: - - -****************************** -amazon.aws.ec2_vpc_subnet_info -****************************** - -**Gather information about ec2 VPC subnets in AWS** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 VPC subnets in AWS -- This module was called ``ec2_vpc_subnet_facts`` before Ansible 2.9. The usage did not change. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- botocore -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- filters - -
- dictionary -
-
- -
A dict of filters to apply. Each dict item consists of a filter key and a filter value. See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSubnets.html for possible filters.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- subnet_ids - -
- list - / elements=string
-
- -
A list of subnet IDs to gather information for.
-

aliases: subnet_id
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- - -Notes ------ - -.. note:: - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Gather information about all VPC subnets - - amazon.aws.ec2_vpc_subnet_info: - - # Gather information about a particular VPC subnet using ID - - amazon.aws.ec2_vpc_subnet_info: - subnet_ids: subnet-00112233 - - # Gather information about any VPC subnet with a tag key Name and value Example - - amazon.aws.ec2_vpc_subnet_info: - filters: - "tag:Name": Example - - # Gather information about any VPC subnet within VPC with ID vpc-abcdef00 - - amazon.aws.ec2_vpc_subnet_info: - filters: - vpc-id: vpc-abcdef00 - - # Gather information about a set of VPC subnets, publicA, publicB and publicC within a - # VPC with ID vpc-abcdef00 and then use the jinja map function to return the - # subnet_ids as a list. - - - amazon.aws.ec2_vpc_subnet_info: - filters: - vpc-id: vpc-abcdef00 - "tag:Name": "{{ item }}" - loop: - - publicA - - publicB - - publicC - register: subnet_info - - - set_fact: - subnet_ids: "{{ subnet_info.subnets|map(attribute='id')|list }}" - - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- subnets - -
- complex -
-
success -
Returns an array of complex objects as described below.
-
-
  -
- assign_ipv6_address_on_creation - -
- boolean -
-
always -
True/False depending on attribute setting for IPv6 address assignment.
-
-
  -
- availability_zone - -
- string -
-
always -
The availability zone where the subnet exists.
-
-
  -
- available_ip_address_count - -
- string -
-
always -
Count of available IPs in subnet.
-
-
  -
- cidr_block - -
- string -
-
always -
The IPv4 CIDR block assigned to the subnet.
-
-
  -
- default_for_az - -
- boolean -
-
always -
True if this is the default subnet for AZ.
-
-
  -
- id - -
- string -
-
always -
The ID of the Subnet (for backwards compatibility).
-
-
  -
- ipv6_cidr_block_association_set - -
- complex -
-
always -
An array of IPv6 cidr block association set information.
-
-
   -
- association_id - -
- string -
-
always -
The association ID
-
-
   -
- ipv6_cidr_block - -
- string -
-
always -
The IPv6 CIDR block that is associated with the subnet.
-
-
   -
- ipv6_cidr_block_state - -
- dictionary -
-
always -
A hash/dict that contains a single item. The state of the cidr block association.
-
-
    -
- state - -
- string -
-
always -
The CIDR block association state.
-
-
  -
- map_public_ip_on_launch - -
- boolean -
-
always -
True/False depending on attribute setting for public IP mapping.
-
-
  -
- state - -
- string -
-
always -
The state of the subnet.
-
-
  -
- subnet_id - -
- string -
-
always -
The ID of the Subnet.
-
-
  -
- tags - -
- dictionary -
-
always -
A dict of tags associated with the Subnet.
-
-
  -
- vpc_id - -
- string -
-
always -
The ID of the VPC .
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. diff --git a/docs/amazon.aws.s3_bucket.rst b/docs/amazon.aws.s3_bucket.rst deleted file mode 100644 index db857f98ffd..00000000000 --- a/docs/amazon.aws.s3_bucket.rst +++ /dev/null @@ -1,495 +0,0 @@ -:orphan: - -.. _amazon.aws.s3_bucket_module: - - -******************** -amazon.aws.s3_bucket -******************** - -**Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 -- python >= 2.6 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- aws_access_key - -
- string -
-
- -
AWS access key. If not set then the value of the AWS_ACCESS_KEY_ID, AWS_ACCESS_KEY or EC2_ACCESS_KEY environment variable is used.
-

aliases: ec2_access_key, access_key
-
-
- aws_config - -
- dictionary -
-
- -
A dictionary to modify the botocore configuration.
- -
Only the 'user_agent' key is used for boto modules. See http://boto.cloudhackers.com/en/latest/boto_config_tut.html#boto for more boto configuration.
-
-
- aws_secret_key - -
- string -
-
- -
AWS secret key. If not set then the value of the AWS_SECRET_ACCESS_KEY, AWS_SECRET_KEY, or EC2_SECRET_KEY environment variable is used.
-

aliases: ec2_secret_key, secret_key
-
-
- ceph - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable API compatibility with Ceph. It takes into account the S3 API subset working with Ceph in order to provide the same module behaviour where possible.
-
-
- debug_botocore_endpoint_logs - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Use a botocore.endpoint logger to parse the unique (rather than total) "resource:action" API calls made during a task, outputing the set to the resource_actions key in the task results. Use the aws_resource_action callback to output to total list made during a playbook. The ANSIBLE_DEBUG_BOTOCORE_LOGS environment variable may also be used.
-
-
- ec2_url - -
- string -
-
- -
Url to use to connect to EC2 or your Eucalyptus cloud (by default the module will use EC2 endpoints). Ignored for modules where region is required. Must be specified for all other modules if region is not used. If not set then the value of the EC2_URL environment variable, if any, is used.
-
-
- encryption - -
- string -
-
-
    Choices: -
  • none
  • -
  • AES256
  • -
  • aws:kms
  • -
-
-
Describes the default server-side encryption to apply to new objects in the bucket. In order to remove the server-side encryption, the encryption needs to be set to 'none' explicitly.
-
-
- encryption_key_id - -
- string -
-
- -
KMS master key ID to use for the default encryption. This parameter is allowed if encryption is aws:kms. If not specified then it will default to the AWS provided KMS key.
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
When trying to delete a bucket, delete all keys (including versions and delete markers) in the bucket first (an s3 bucket must be empty for a successful deletion)
-
-
- name - -
- string - / required
-
- -
Name of the s3 bucket
-
-
- policy - -
- json -
-
- -
The JSON policy as a string.
-
-
- profile - -
- string -
-
- -
Uses a boto profile. Only works with boto >= 2.24.0.
-
-
- purge_tags - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
whether to remove tags that aren't present in the tags parameter
-
-
- region - -
- string -
-
- -
The AWS region to use. If not specified then the value of the AWS_REGION or EC2_REGION environment variable, if any, is used. See http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region
-

aliases: aws_region, ec2_region
-
-
- requester_pays - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
With Requester Pays buckets, the requester instead of the bucket owner pays the cost of the request and the data download from the bucket.
-
-
- s3_url - -
- string -
-
- -
S3 URL endpoint for usage with DigitalOcean, Ceph, Eucalyptus and fakes3 etc.
-
Assumes AWS if not specified.
-
For Walrus, use FQDN of the endpoint without scheme nor path.
-

aliases: S3_URL
-
-
- security_token - -
- string -
-
- -
AWS STS security token. If not set then the value of the AWS_SECURITY_TOKEN or EC2_SECURITY_TOKEN environment variable is used.
-

aliases: access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Create or remove the s3 bucket
-
-
- tags - -
- dictionary -
-
- -
tags dict to apply to bucket
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.
-
-
- versioning - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether versioning is enabled or disabled (note that once versioning is enabled, it can only be suspended)
-
-
- - -Notes ------ - -.. note:: - - If ``requestPayment``, ``policy``, ``tagging`` or ``versioning`` operations/API aren't implemented by the endpoint, module doesn't fail if each parameter satisfies the following condition. *requester_pays* is ``False``, *policy*, *tags*, and *versioning* are ``None``. - - If parameters are not set within the module, the following environment variables can be used in decreasing order of precedence ``AWS_URL`` or ``EC2_URL``, ``AWS_ACCESS_KEY_ID`` or ``AWS_ACCESS_KEY`` or ``EC2_ACCESS_KEY``, ``AWS_SECRET_ACCESS_KEY`` or ``AWS_SECRET_KEY`` or ``EC2_SECRET_KEY``, ``AWS_SECURITY_TOKEN`` or ``EC2_SECURITY_TOKEN``, ``AWS_REGION`` or ``EC2_REGION`` - - Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file - - - -Examples --------- - -.. code-block:: yaml+jinja - - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Create a simple s3 bucket - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - - # Create a simple s3 bucket on Ceph Rados Gateway - - amazon.aws.s3_bucket: - name: mys3bucket - s3_url: http://your-ceph-rados-gateway-server.xxx - ceph: true - - # Remove an s3 bucket and any keys it contains - - amazon.aws.s3_bucket: - name: mys3bucket - state: absent - force: yes - - # Create a bucket, add a policy from a file, enable requester pays, enable versioning and tag - - amazon.aws.s3_bucket: - name: mys3bucket - policy: "{{ lookup('file','policy.json') }}" - requester_pays: yes - versioning: yes - tags: - example: tag1 - another: tag2 - - # Create a simple DigitalOcean Spaces bucket using their provided regional endpoint - - amazon.aws.s3_bucket: - name: mydobucket - s3_url: 'https://nyc3.digitaloceanspaces.com' - - # Create a bucket with AES256 encryption - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - encryption: "AES256" - - # Create a bucket with aws:kms encryption, KMS key - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - encryption: "aws:kms" - encryption_key_id: "arn:aws:kms:us-east-1:1234/5678example" - - # Create a bucket with aws:kms encryption, default key - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - encryption: "aws:kms" - - - - - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) - - -.. hint:: - Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.