diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml new file mode 100644 index 00000000000..390e2b13333 --- /dev/null +++ b/.github/workflows/docs-pr.yml @@ -0,0 +1,67 @@ +name: Collection Docs +concurrency: + group: docs-${{ github.head_ref }} + cancel-in-progress: true +on: + pull_request_target: + types: [opened, synchronize, reopened, closed] + +env: + GHP_BASE_URL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }} + +jobs: + validate-docs: + permissions: + contents: read + name: Validate Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main + with: + init-lenient: true + init-fail-on-error: true + + + build-docs: + permissions: + contents: read + name: Build Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-pr.yml@main + with: + init-lenient: true + init-fail-on-error: true + + comment: + permissions: + pull-requests: write + runs-on: ubuntu-latest + needs: [build-docs] + name: PR comments + steps: + - name: PR comment + uses: ansible-community/github-docs-build/actions/ansible-docs-build-comment@main + with: + body-includes: '## Docs Build' + reactions: heart + action: ${{ needs.build-docs.outputs.changed != 'true' && 'remove' || '' }} + on-closed-action: remove + on-merged-body: | + ## Docs Build 📝 + + Thank you for contribution!✨ + + This PR has been merged and your docs changes will be incorporated when they are next published. + body: | + ## Docs Build 📝 + + Thank you for contribution!✨ + + The docsite for **this PR** is available for download as an artifact from this run: + ${{ needs.build-docs.outputs.artifact-url }} + + You can compare to the docs for the `main` branch here: + ${{ env.GHP_BASE_URL }}/branch/main + + File changes: + + ${{ needs.build-docs.outputs.diff-files-rendered }} + + ${{ needs.build-docs.outputs.diff-rendered }} diff --git a/.github/workflows/docs-push.yml b/.github/workflows/docs-push.yml new file mode 100644 index 00000000000..56a4868bf31 --- /dev/null +++ b/.github/workflows/docs-push.yml @@ -0,0 +1,36 @@ +name: Collection Docs +concurrency: + group: docs-push-${{ github.sha }} + cancel-in-progress: true +on: + push: + branches: + - main + - stable-* + tags: + - '*' + schedule: + - cron: '0 12 * * *' + +jobs: + build-docs: + permissions: + contents: read + name: Build Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-push.yml@main + with: + init-lenient: true + init-fail-on-error: true + + publish-docs-gh-pages: + # use to prevent running on forks + if: github.repository == 'ansible-collections/amazon.aws' + permissions: + contents: write + needs: [build-docs] + name: Publish Ansible Docs + uses: ansible-community/github-docs-build/.github/workflows/_shared-docs-build-publish-gh-pages.yml@main + with: + artifact-name: ${{ needs.build-docs.outputs.artifact-name }} + secrets: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index b2e7aecb374..e5a3317fc73 100644 --- a/README.md +++ b/README.md @@ -26,66 +26,8 @@ Version 3.0.0 of this collection supports `boto3 >= 1.16.0` and `botocore >= 1.1 Support for the original AWS SDK `boto` has been deprecated and the module_utils library code to support it will be removed in release 4.0.0. ## Included content - -### Inventory plugins -Name | Description ---- | --- -[amazon.aws.aws_ec2](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_ec2_inventory.rst)|EC2 inventory source -[amazon.aws.aws_rds](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_rds_inventory.rst)|rds instance source - -### Lookup plugins -Name | Description ---- | --- -[amazon.aws.aws_account_attribute](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_account_attribute_lookup.rst)|Look up AWS account attributes. -[amazon.aws.aws_secret](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_secret_lookup.rst)|Look up secrets stored in AWS Secrets Manager. -[amazon.aws.aws_service_ip_ranges](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_service_ip_ranges_lookup.rst)|Look up the IP ranges for services provided in AWS such as EC2 and S3. -[amazon.aws.aws_ssm](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_ssm_lookup.rst)|Get the value for a SSM parameter or all parameters under a path. - -### Modules -Name | Description ---- | --- -[amazon.aws.aws_az_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_az_info_module.rst)|Gather information about availability zones in AWS. -[amazon.aws.aws_caller_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_caller_info_module.rst)|Get information about the user and account being used to make AWS calls. -[amazon.aws.aws_s3](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.aws_s3_module.rst)|manage objects in S3. -[amazon.aws.cloudformation](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.cloudformation_module.rst)|Create or delete an AWS CloudFormation stack -[amazon.aws.cloudformation_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.cloudformation_info_module.rst)|Obtain information about an AWS CloudFormation stack -[amazon.aws.ec2](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_module.rst)|create, terminate, start or stop an instance in ec2 -[amazon.aws.ec2_ami](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_ami_module.rst)|Create or destroy an image (AMI) in ec2 -[amazon.aws.ec2_ami_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_ami_info_module.rst)|Gather information about ec2 AMIs -[amazon.aws.ec2_eni](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_eni_module.rst)|Create and optionally attach an Elastic Network Interface (ENI) to an instance -[amazon.aws.ec2_eni_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_eni_info_module.rst)|Gather information about ec2 ENI interfaces in AWS -[amazon.aws.ec2_group](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_group_module.rst)|maintain an ec2 VPC security group. -[amazon.aws.ec2_group_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_group_info_module.rst)|Gather information about ec2 security groups in AWS. -[amazon.aws.ec2_instance](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_instance_module.rst)|Create & manage EC2 instances -[amazon.aws.ec2_instance_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_instance_info_module.rst)|Gather information about ec2 instances in AWS -[amazon.aws.ec2_key](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_key_module.rst)|create or delete an ec2 key pair -[amazon.aws.ec2_metadata_facts](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_metadata_facts_module.rst)|gathers facts (instance metadata) about remote hosts within EC2 -[amazon.aws.ec2_snapshot](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_snapshot_module.rst)|Creates a snapshot from an existing volume -[amazon.aws.ec2_snapshot_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_snapshot_info_module.rst)|Gathers information about EC2 volume snapshots in AWS -[amazon.aws.ec2_spot_instance](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_spot_instance_module.rst)|request, stop, reboot or cancel spot instance -[amazon.aws.ec2_spot_instance_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_spot_instance_info_module.rst)|Gather information about ec2 spot instance requests -[amazon.aws.ec2_tag](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_tag_module.rst)|create and remove tags on ec2 resources -[amazon.aws.ec2_tag_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_tag_info_module.rst)|list tags on ec2 resources -[amazon.aws.ec2_vol](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vol_module.rst)|Create and attach a volume, return volume id and device map -[amazon.aws.ec2_vol_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vol_info_module.rst)|Gather information about ec2 volumes in AWS -[amazon.aws.ec2_vpc_dhcp_option](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_dhcp_option_module.rst)|Manages DHCP Options, and can ensure the DHCP options for the given VPC match what's requested -[amazon.aws.ec2_vpc_dhcp_option_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_dhcp_option_info_module.rst)|Gather information about dhcp options sets in AWS -[amazon.aws.ec2_vpc_endpoint](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_endpoint_module.rst)|Create and delete AWS VPC Endpoints. -[amazon.aws.ec2_vpc_endpoint_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_endpoint_info_module.rst)|Retrieves AWS VPC endpoints details using AWS methods. -[amazon.aws.ec2_vpc_endpoint_service_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_endpoint_service_info_module.rst)|retrieves AWS VPC endpoint service details -[amazon.aws.ec2_vpc_igw](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_igw_module.rst)|Manage an AWS VPC Internet gateway -[amazon.aws.ec2_vpc_igw_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_igw_info_module.rst)|Gather information about internet gateways in AWS -[amazon.aws.ec2_vpc_nat_gateway](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_nat_gateway_module.rst)|Manage AWS VPC NAT Gateways. -[amazon.aws.ec2_vpc_nat_gateway_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_nat_gateway_info_module.rst)|Retrieves AWS VPC Managed Nat Gateway details using AWS methods. -[amazon.aws.ec2_vpc_net](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_net_module.rst)|Configure AWS virtual private clouds -[amazon.aws.ec2_vpc_net_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_net_info_module.rst)|Gather information about ec2 VPCs in AWS -[amazon.aws.ec2_vpc_route_table](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_route_table_module.rst)|Manage route tables for AWS virtual private clouds -[amazon.aws.ec2_vpc_route_table_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_route_table_info_module.rst)|Gather information about ec2 VPC route tables in AWS -[amazon.aws.ec2_vpc_subnet](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_subnet_module.rst)|Manage subnets in AWS virtual private clouds -[amazon.aws.ec2_vpc_subnet_info](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.ec2_vpc_subnet_info_module.rst)|Gather information about ec2 VPC subnets in AWS -[amazon.aws.elb_classic_lb](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.elb_classic_lb_module.rst)|creates, updates or destroys an Amazon ELB. -[amazon.aws.s3_bucket](https://github.com/ansible-collections/amazon.aws/blob/stable-3/docs/amazon.aws.s3_bucket_module.rst)|Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID +See the complete list of collection content in the [Plugin Index](https://ansible-collections.github.io/amazon.aws/branch/main/collections/amazon/aws/index.html#plugin-index). @@ -133,8 +75,6 @@ You can either call modules by their Fully Qualified Collection Namespace (FQCN) register: instance ``` -**NOTE**: For Ansible 2.9, you may not see deprecation warnings when you run your playbooks with this collection. Use this documentation to track when a module is deprecated. - ### See Also: diff --git a/docs/amazon.aws.aws_account_attribute_lookup.rst b/docs/amazon.aws.aws_account_attribute_lookup.rst deleted file mode 100644 index cefe7f5456d..00000000000 --- a/docs/amazon.aws.aws_account_attribute_lookup.rst +++ /dev/null @@ -1,237 +0,0 @@ -.. _amazon.aws.aws_account_attribute_lookup: - - -******************************** -amazon.aws.aws_account_attribute -******************************** - -**Look up AWS account attributes.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Describes attributes of your AWS account. You can specify one of the listed attribute choices or omit it to see all attributes. - - - -Requirements ------------- -The below requirements are needed on the local Ansible controller node that executes this lookup. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- attribute - -
- - -
-
-
    Choices: -
  • supported-platforms
  • -
  • default-vpc
  • -
  • max-instances
  • -
  • vpc-max-security-groups-per-interface
  • -
  • max-elastic-ips
  • -
  • vpc-max-elastic-ips
  • -
  • has-ec2-classic
  • -
-
- -
The attribute for which to get the value(s).
-
-
- aws_access_key - -
- string -
-
- -
env:EC2_ACCESS_KEY
-
env:AWS_ACCESS_KEY
-
env:AWS_ACCESS_KEY_ID
-
-
The AWS access key to use.
-

aliases: aws_access_key_id
-
-
- aws_profile - -
- string -
-
- -
env:AWS_DEFAULT_PROFILE
-
env:AWS_PROFILE
-
-
The AWS profile
-

aliases: boto_profile
-
-
- aws_secret_key - -
- string -
-
- -
env:EC2_SECRET_KEY
-
env:AWS_SECRET_KEY
-
env:AWS_SECRET_ACCESS_KEY
-
-
The AWS secret key that corresponds to the access key.
-

aliases: aws_secret_access_key
-
-
- aws_security_token - -
- string -
-
- -
env:EC2_SECURITY_TOKEN
-
env:AWS_SESSION_TOKEN
-
env:AWS_SECURITY_TOKEN
-
-
The AWS security token if using temporary access and secret keys.
-
-
- region - -
- string -
-
- -
env:EC2_REGION
-
env:AWS_REGION
-
-
The region for which to create the connection.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - vars: - has_ec2_classic: "{{ lookup('aws_account_attribute', attribute='has-ec2-classic') }}" - # true | false - - default_vpc_id: "{{ lookup('aws_account_attribute', attribute='default-vpc') }}" - # vpc-xxxxxxxx | none - - account_details: "{{ lookup('aws_account_attribute', wantlist='true') }}" - # {'default-vpc': ['vpc-xxxxxxxx'], 'max-elastic-ips': ['5'], 'max-instances': ['20'], - # 'supported-platforms': ['VPC', 'EC2'], 'vpc-max-elastic-ips': ['5'], 'vpc-max-security-groups-per-interface': ['5']} - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this lookup: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- _raw - -
- - -
-
-
Returns a boolean when attribute is check_ec2_classic. Otherwise returns the value(s) of the attribute (or all attributes if one is not specified).
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- 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.aws_az_info_module.rst b/docs/amazon.aws.aws_az_info_module.rst deleted file mode 100644 index 95c52a49ded..00000000000 --- a/docs/amazon.aws.aws_az_info_module.rst +++ /dev/null @@ -1,314 +0,0 @@ -.. _amazon.aws.aws_az_info_module: - - -********************** -amazon.aws.aws_az_info -********************** - -**Gather information about availability zones in AWS.** - - -Version added: 1.0.0 - -.. 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. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- filters - -
- dictionary -
-
- Default:
{}
-
-
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.
-
You can use underscores instead of dashes (-) in the filter keys.
-
Filter keys with underscores will take precedence in case of conflict.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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) diff --git a/docs/amazon.aws.aws_caller_info_module.rst b/docs/amazon.aws.aws_caller_info_module.rst deleted file mode 100644 index ff86e9d219c..00000000000 --- a/docs/amazon.aws.aws_caller_info_module.rst +++ /dev/null @@ -1,342 +0,0 @@ -.. _amazon.aws.aws_caller_info_module: - - -************************** -amazon.aws.aws_caller_info -************************** - -**Get information about the user and account being used to make AWS calls.** - - -Version added: 1.0.0 - -.. 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. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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) diff --git a/docs/amazon.aws.aws_ec2_inventory.rst b/docs/amazon.aws.aws_ec2_inventory.rst deleted file mode 100644 index b2e80f5c304..00000000000 --- a/docs/amazon.aws.aws_ec2_inventory.rst +++ /dev/null @@ -1,968 +0,0 @@ -.. _amazon.aws.aws_ec2_inventory: - - -****************** -amazon.aws.aws_ec2 -****************** - -**EC2 inventory source** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Get inventory hosts from Amazon Web Services EC2. -- Uses a YAML configuration file that ends with ``aws_ec2.{yml|yaml}``. - - - -Requirements ------------- -The below requirements are needed on the local Ansible controller node that executes this inventory. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- aws_access_key - -
- string -
-
- -
env:EC2_ACCESS_KEY
-
env:AWS_ACCESS_KEY
-
env:AWS_ACCESS_KEY_ID
-
-
The AWS access key to use.
-

aliases: aws_access_key_id
-
-
- aws_profile - -
- string -
-
- -
env:AWS_DEFAULT_PROFILE
-
env:AWS_PROFILE
-
-
The AWS profile
-

aliases: boto_profile
-
-
- aws_secret_key - -
- string -
-
- -
env:EC2_SECRET_KEY
-
env:AWS_SECRET_KEY
-
env:AWS_SECRET_ACCESS_KEY
-
-
The AWS secret key that corresponds to the access key.
-

aliases: aws_secret_access_key
-
-
- aws_security_token - -
- string -
-
- -
env:EC2_SECURITY_TOKEN
-
env:AWS_SESSION_TOKEN
-
env:AWS_SECURITY_TOKEN
-
-
The AWS security token if using temporary access and secret keys.
-
-
- cache - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ini entries: -

[inventory]
cache = no

-
-
env:ANSIBLE_INVENTORY_CACHE
-
-
Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
-
-
- cache_connection - -
- string -
-
- -
ini entries: -

[defaults]
fact_caching_connection = VALUE

-

[inventory]
cache_connection = VALUE

-
-
env:ANSIBLE_CACHE_PLUGIN_CONNECTION
-
env:ANSIBLE_INVENTORY_CACHE_CONNECTION
-
-
Cache connection data or path, read cache plugin documentation for specifics.
-
-
- cache_plugin - -
- string -
-
- Default:
"memory"
-
-
ini entries: -

[defaults]
fact_caching = memory

-

[inventory]
cache_plugin = memory

-
-
env:ANSIBLE_CACHE_PLUGIN
-
env:ANSIBLE_INVENTORY_CACHE_PLUGIN
-
-
Cache plugin to use for the inventory's source data.
-
-
- cache_prefix - -
- - -
-
- Default:
"ansible_inventory_"
-
-
ini entries: -

[default]
fact_caching_prefix = ansible_inventory_

-

[defaults]
fact_caching_prefix = ansible_inventory_

-

[inventory]
cache_prefix = ansible_inventory_

-
-
env:ANSIBLE_CACHE_PLUGIN_PREFIX
-
env:ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
-
-
Prefix to use for cache plugin files/tables
-
-
- cache_timeout - -
- integer -
-
- Default:
3600
-
-
ini entries: -

[defaults]
fact_caching_timeout = 3600

-

[inventory]
cache_timeout = 3600

-
-
env:ANSIBLE_CACHE_PLUGIN_TIMEOUT
-
env:ANSIBLE_INVENTORY_CACHE_TIMEOUT
-
-
Cache duration in seconds
-
-
- compose - -
- dictionary -
-
- Default:
{}
-
- -
Create vars from jinja2 expressions.
-
-
- exclude_filters - -
- list - / elements=dictionary -
-
added in 1.5.0
-
- Default:
[]
-
- -
A list of filters. Any instances matching one of the filters are excluded from the result.
-
The filters from exclude_filters take priority over the include_filters and filters keys
- -
Every entry in this list triggers a search query. As such, from a performance point of view, it's better to keep the list as short as possible.
-
-
- filters - -
- dictionary -
-
- Default:
{}
-
- -
A dictionary of filter value pairs.
- -
-
- groups - -
- dictionary -
-
- Default:
{}
-
- -
Add hosts to group based on Jinja2 conditionals.
-
-
- hostnames - -
- list - / elements=dictionary -
-
- Default:
[]
-
- -
A list in order of precedence for hostname variables.
-
-
- name - -
- string - / required -
-
- - -
Name of the host.
- -
To use tags as hostnames use the syntax tag:Name=Value to use the hostname Name_Value, or tag:Name to use the value of the Name tag.
-
If value provided does not exist in the above options, it will be used as a literal string.
-
-
- prefix - -
- string -
-
- Default:
""
-
- -
Prefix to prepend to name. Same options as name.
-
If prefix is specified, final hostname will be prefix + separator + name.
-
-
- separator - -
- string -
-
- Default:
"_"
-
- -
Value to separate prefix and name when prefix is specified.
-
-
- hostvars_prefix - -
- string -
-
added in 3.1.0
-
- - -
The prefix for host variables names coming from AWS.
-
-
- hostvars_suffix - -
- string -
-
added in 3.1.0
-
- - -
The suffix for host variables names coming from AWS.
-
-
- iam_role_arn - -
- - -
-
- - -
The ARN of the IAM role to assume to perform the inventory lookup. You should still provide AWS credentials with enough privilege to perform the AssumeRole action.
-
-
- include_extra_api_calls - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
Add two additional API calls for every instance to include 'persistent' and 'events' host variables.
-
Spot instances may be persistent and instances may have associated events.
-
-
- include_filters - -
- list - / elements=dictionary -
-
added in 1.5.0
-
- Default:
[]
-
- -
A list of filters. Any instances matching at least one of the filters are included in the result.
- -
Every entry in this list triggers a search query. As such, from a performance point of view, it's better to keep the list as short as possible.
-
-
- keyed_groups - -
- list - / elements=dictionary -
-
- Default:
[]
-
- -
Add hosts to group based on the values of a variable.
-
-
- default_value - -
- string -
-
added in 2.12
-
- - -
The default value when the host variable's value is an empty string.
-
This option is mutually exclusive with trailing_separator.
-
-
- key - -
- string -
-
- - -
The key from input dictionary used to generate groups
-
-
- parent_group - -
- string -
-
- - -
parent group for keyed group
-
-
- prefix - -
- string -
-
- Default:
""
-
- -
A keyed group name will start with this prefix
-
-
- separator - -
- string -
-
- Default:
"_"
-
- -
separator used to build the keyed group name
-
-
- trailing_separator - -
- boolean -
-
added in 2.12
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
- -
Set this option to False to omit the separator after the host variable when the value is an empty string.
-
This option is mutually exclusive with default_value.
-
-
- leading_separator - -
- boolean -
-
added in 2.11
-
- Default:
"yes"
-
- -
Use in conjunction with keyed_groups.
-
By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
-
This is because the default prefix is "" and the default separator is "_".
-
Set this option to False to omit the leading underscore (or other separator) if no prefix is given.
-
If the group name is derived from a mapping the separator is still used to concatenate the items.
-
To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
-
-
- plugin - -
- - - / required -
-
-
    Choices: -
  • aws_ec2
  • -
  • amazon.aws.aws_ec2
  • -
-
- -
Token that ensures this is a source file for the plugin.
-
-
- regions - -
- list - / elements=string -
-
- Default:
[]
-
- -
A list of regions in which to describe EC2 instances.
-
If empty (the default) default this will include all regions, except possibly restricted ones like us-gov-west-1 and cn-north-1.
-
-
- strict - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
If yes make invalid entries a fatal error, otherwise skip and continue.
-
Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
-
-
- strict_permissions - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
- -
By default if a 403 (Forbidden) error code is encountered this plugin will fail.
-
You can set this option to False in the inventory config file which will allow 403 errors to be gracefully skipped.
-
-
- use_contrib_script_compatible_ec2_tag_keys - -
- boolean -
-
added in 1.5.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
Expose the host tags with ec2_tag_TAGNAME keys like the old ec2.py inventory script.
-
The use of this feature is discouraged and we advise to migrate to the new ``tags`` structure.
-
-
- use_contrib_script_compatible_sanitization - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
By default this plugin is using a general group name sanitization to create safe and usable group names for use in Ansible. This option allows you to override that, in efforts to allow migration from the old inventory script and matches the sanitization of groups when the script's ``replace_dash_in_groups`` option is set to ``False``. To replicate behavior of ``replace_dash_in_groups = True`` with constructed groups, you will need to replace hyphens with underscores via the regex_replace filter for those entries.
-
For this to work you should also turn off the TRANSFORM_INVALID_GROUP_CHARS setting, otherwise the core engine will just use the standard sanitization on top.
-
This is not the default as such names break certain functionality as not all characters are valid Python identifiers which group names end up being used as.
-
-
- use_extra_vars - -
- boolean -
-
added in 2.11
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ini entries: -

[inventory_plugins]
use_extra_vars = no

-
-
env:ANSIBLE_INVENTORY_USE_EXTRA_VARS
-
-
Merge extra vars into the available variables for composition (highest precedence).
-
-
- - -Notes ------ - -.. note:: - - If no credentials are provided and the control node has an associated IAM instance profile then the role will be used for authentication. - - - -Examples --------- - -.. code-block:: yaml - - # Minimal example using environment vars or instance role credentials - # Fetch all hosts in us-east-1, the hostname is the public DNS if it exists, otherwise the private IP address - plugin: aws_ec2 - regions: - - us-east-1 - - # Example using filters, ignoring permission errors, and specifying the hostname precedence - plugin: aws_ec2 - # The values for profile, access key, secret key and token can be hardcoded like: - boto_profile: aws_profile - # or you could use Jinja as: - # boto_profile: "{{ lookup('env', 'AWS_PROFILE') | default('aws_profile', true) }}" - # Populate inventory with instances in these regions - regions: - - us-east-1 - - us-east-2 - filters: - # All instances with their `Environment` tag set to `dev` - tag:Environment: dev - # All dev and QA hosts - tag:Environment: - - dev - - qa - instance.group-id: sg-xxxxxxxx - # Ignores 403 errors rather than failing - strict_permissions: False - # Note: I(hostnames) sets the inventory_hostname. To modify ansible_host without modifying - # inventory_hostname use compose (see example below). - hostnames: - - tag:Name=Tag1,Name=Tag2 # Return specific hosts only - - tag:CustomDNSName - - dns-name - - name: 'tag:Name=Tag1,Name=Tag2' - - name: 'private-ip-address' - separator: '_' - prefix: 'tag:Name' - - name: 'test_literal' # Using literal values for hostname - separator: '-' # Hostname will be aws-test_literal - prefix: 'aws' - - # Example using constructed features to create groups and set ansible_host - plugin: aws_ec2 - regions: - - us-east-1 - - us-west-1 - # keyed_groups may be used to create custom groups - strict: False - keyed_groups: - # Add e.g. x86_64 hosts to an arch_x86_64 group - - prefix: arch - key: 'architecture' - # Add hosts to tag_Name_Value groups for each Name/Value tag pair - - prefix: tag - key: tags - # Add hosts to e.g. instance_type_z3_tiny - - prefix: instance_type - key: instance_type - # Create security_groups_sg_abcd1234 group for each SG - - key: 'security_groups|json_query("[].group_id")' - prefix: 'security_groups' - # Create a group for each value of the Application tag - - key: tags.Application - separator: '' - # Create a group per region e.g. aws_region_us_east_2 - - key: placement.region - prefix: aws_region - # Create a group (or groups) based on the value of a custom tag "Role" and add them to a metagroup called "project" - - key: tags['Role'] - prefix: foo - parent_group: "project" - # Set individual variables with compose - compose: - # Use the private IP address to connect to the host - # (note: this does not modify inventory_hostname, which is set via I(hostnames)) - ansible_host: private_ip_address - - # Example using include_filters and exclude_filters to compose the inventory. - plugin: aws_ec2 - regions: - - us-east-1 - - us-west-1 - include_filters: - - tag:Name: - - 'my_second_tag' - - tag:Name: - - 'my_third_tag' - exclude_filters: - - tag:Name: - - 'my_first_tag' - - # Example using groups to assign the running hosts to a group based on vpc_id - plugin: aws_ec2 - boto_profile: aws_profile - # Populate inventory with instances in these regions - regions: - - us-east-2 - filters: - # All instances with their state as `running` - instance-state-name: running - keyed_groups: - - prefix: tag - key: tags - compose: - ansible_host: public_dns_name - groups: - libvpc: vpc_id == 'vpc-####' - # Define prefix and suffix for host variables coming from AWS. - plugin: aws_ec2 - regions: - - us-east-1 - hostvars_prefix: 'aws_' - hostvars_suffix: '_ec2' - - - - -Status ------- - - -Authors -~~~~~~~ - -- 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.aws_rds_inventory.rst b/docs/amazon.aws.aws_rds_inventory.rst deleted file mode 100644 index 27dc63cbd31..00000000000 --- a/docs/amazon.aws.aws_rds_inventory.rst +++ /dev/null @@ -1,689 +0,0 @@ -.. _amazon.aws.aws_rds_inventory: - - -****************** -amazon.aws.aws_rds -****************** - -**rds instance source** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Get instances and clusters from Amazon Web Services RDS. -- Uses a YAML configuration file that ends with aws_rds.(yml|yaml). - - - -Requirements ------------- -The below requirements are needed on the local Ansible controller node that executes this inventory. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- aws_access_key - -
- string -
-
- -
env:EC2_ACCESS_KEY
-
env:AWS_ACCESS_KEY
-
env:AWS_ACCESS_KEY_ID
-
-
The AWS access key to use.
-

aliases: aws_access_key_id
-
-
- aws_profile - -
- string -
-
- -
env:AWS_DEFAULT_PROFILE
-
env:AWS_PROFILE
-
-
The AWS profile
-

aliases: boto_profile
-
-
- aws_secret_key - -
- string -
-
- -
env:EC2_SECRET_KEY
-
env:AWS_SECRET_KEY
-
env:AWS_SECRET_ACCESS_KEY
-
-
The AWS secret key that corresponds to the access key.
-

aliases: aws_secret_access_key
-
-
- aws_security_token - -
- string -
-
- -
env:EC2_SECURITY_TOKEN
-
env:AWS_SESSION_TOKEN
-
env:AWS_SECURITY_TOKEN
-
-
The AWS security token if using temporary access and secret keys.
-
-
- cache - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ini entries: -

[inventory]
cache = no

-
-
env:ANSIBLE_INVENTORY_CACHE
-
-
Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work.
-
-
- cache_connection - -
- string -
-
- -
ini entries: -

[defaults]
fact_caching_connection = VALUE

-

[inventory]
cache_connection = VALUE

-
-
env:ANSIBLE_CACHE_PLUGIN_CONNECTION
-
env:ANSIBLE_INVENTORY_CACHE_CONNECTION
-
-
Cache connection data or path, read cache plugin documentation for specifics.
-
-
- cache_plugin - -
- string -
-
- Default:
"memory"
-
-
ini entries: -

[defaults]
fact_caching = memory

-

[inventory]
cache_plugin = memory

-
-
env:ANSIBLE_CACHE_PLUGIN
-
env:ANSIBLE_INVENTORY_CACHE_PLUGIN
-
-
Cache plugin to use for the inventory's source data.
-
-
- cache_prefix - -
- - -
-
- Default:
"ansible_inventory_"
-
-
ini entries: -

[default]
fact_caching_prefix = ansible_inventory_

-

[defaults]
fact_caching_prefix = ansible_inventory_

-

[inventory]
cache_prefix = ansible_inventory_

-
-
env:ANSIBLE_CACHE_PLUGIN_PREFIX
-
env:ANSIBLE_INVENTORY_CACHE_PLUGIN_PREFIX
-
-
Prefix to use for cache plugin files/tables
-
-
- cache_timeout - -
- integer -
-
- Default:
3600
-
-
ini entries: -

[defaults]
fact_caching_timeout = 3600

-

[inventory]
cache_timeout = 3600

-
-
env:ANSIBLE_CACHE_PLUGIN_TIMEOUT
-
env:ANSIBLE_INVENTORY_CACHE_TIMEOUT
-
-
Cache duration in seconds
-
-
- compose - -
- dictionary -
-
- Default:
{}
-
- -
Create vars from jinja2 expressions.
-
-
- filters - -
- - -
-
- Default:
{}
-
- -
A dictionary of filter value pairs. Available filters are listed here https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-instances.html#options. If you filter by db-cluster-id and include_clusters is True it will apply to clusters as well.
-
-
- groups - -
- dictionary -
-
- Default:
{}
-
- -
Add hosts to group based on Jinja2 conditionals.
-
-
- hostvars_prefix - -
- string -
-
added in 3.1.0
-
- - -
The prefix for host variables names coming from AWS.
-
-
- hostvars_suffix - -
- string -
-
added in 3.1.0
-
- - -
The suffix for host variables names coming from AWS.
-
-
- iam_role_arn - -
- - -
-
- - -
The ARN of the IAM role to assume to perform the inventory lookup. You should still provide AWS credentials with enough privilege to perform the AssumeRole action.
-
-
- include_clusters - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
Whether or not to query for Aurora clusters as well as instances
-
-
- keyed_groups - -
- list - / elements=dictionary -
-
- Default:
[]
-
- -
Add hosts to group based on the values of a variable.
-
-
- default_value - -
- string -
-
added in 2.12
-
- - -
The default value when the host variable's value is an empty string.
-
This option is mutually exclusive with trailing_separator.
-
-
- key - -
- string -
-
- - -
The key from input dictionary used to generate groups
-
-
- parent_group - -
- string -
-
- - -
parent group for keyed group
-
-
- prefix - -
- string -
-
- Default:
""
-
- -
A keyed group name will start with this prefix
-
-
- separator - -
- string -
-
- Default:
"_"
-
- -
separator used to build the keyed group name
-
-
- trailing_separator - -
- boolean -
-
added in 2.12
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
- -
Set this option to False to omit the separator after the host variable when the value is an empty string.
-
This option is mutually exclusive with default_value.
-
-
- leading_separator - -
- boolean -
-
added in 2.11
-
- Default:
"yes"
-
- -
Use in conjunction with keyed_groups.
-
By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore.
-
This is because the default prefix is "" and the default separator is "_".
-
Set this option to False to omit the leading underscore (or other separator) if no prefix is given.
-
If the group name is derived from a mapping the separator is still used to concatenate the items.
-
To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead.
-
-
- regions - -
- - -
-
- Default:
[]
-
- -
A list of regions in which to describe RDS instances and clusters. Available regions are listed here https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html
-
-
- statuses - -
- list - / elements=string -
-
- Default:
["creating", "available"]
-
- -
A list of desired states for instances/clusters to be added to inventory. Set to ['all'] as a shorthand to find everything.
-
-
- strict - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
- -
If yes make invalid entries a fatal error, otherwise skip and continue.
-
Since it is possible to use facts in the expressions they might not always be available and we ignore those errors by default.
-
-
- strict_permissions - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
- -
By default if an AccessDenied exception is encountered this plugin will fail. You can set strict_permissions to False in the inventory config file which will allow the restrictions to be gracefully skipped.
-
-
- use_extra_vars - -
- boolean -
-
added in 2.11
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
ini entries: -

[inventory_plugins]
use_extra_vars = no

-
-
env:ANSIBLE_INVENTORY_USE_EXTRA_VARS
-
-
Merge extra vars into the available variables for composition (highest precedence).
-
-
- - -Notes ------ - -.. note:: - - Ansible versions prior to 2.10 should use the fully qualified plugin name 'amazon.aws.aws_rds'. - - - -Examples --------- - -.. code-block:: yaml - - plugin: aws_rds - regions: - - us-east-1 - - ca-central-1 - keyed_groups: - - key: 'db_parameter_groups|json_query("[].db_parameter_group_name")' - prefix: rds_parameter_group - - key: engine - prefix: rds - - key: tags - - key: region - hostvars_prefix: aws_ - hostvars_suffix: _rds - - - - -Status ------- - - -Authors -~~~~~~~ - -- 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.aws_s3_module.rst b/docs/amazon.aws.aws_s3_module.rst deleted file mode 100644 index c765533afdf..00000000000 --- a/docs/amazon.aws.aws_s3_module.rst +++ /dev/null @@ -1,1013 +0,0 @@ -.. _amazon.aws.aws_s3_module: - - -***************** -amazon.aws.aws_s3 -***************** - -**manage objects in S3.** - - -Version added: 1.0.0 - -.. 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, generating download links and copy of an object that is already stored in Amazon S3. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_secret_key, secret_key
-
-
- bucket - -
- string - / required -
-
- -
Bucket name.
-
-
- content - -
- string -
-
added in 1.3.0
-
- -
The content to PUT into an object.
-
The parameter value will be treated as a string and converted to UTF-8 before sending it to S3. To send binary data, use the content_base64 parameter instead.
-
Either content, content_base64 or src must be specified for a PUT operation. Ignored otherwise.
-
-
- content_base64 - -
- string -
-
added in 1.3.0
-
- -
The base64-encoded binary data to PUT into an object.
-
Use this if you need to put raw binary data, and don't forget to encode in base64.
-
Either content, content_base64 or src must be specified for a PUT operation. Ignored otherwise.
-
-
- copy_src - -
- dictionary -
-
added in 2.0.0
-
- -
The source details of the object to copy.
-
Required if mode is copy.
-
-
- bucket - -
- string - / required -
-
- -
The name of the source bucket.
-
-
- object - -
- string - / required -
-
- -
key name of the source object.
-
-
- version_id - -
- string -
-
- -
version ID of the source object.
-
-
- 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.
-
-
- 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- encrypt - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set for PUT/COPY 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/COPY operation, as a dictionary of key=value and key=value,key=value.
-
-
- mode - -
- string - / required -
-
-
    Choices: -
  • get
  • -
  • put
  • -
  • delete
  • -
  • create
  • -
  • geturl
  • -
  • getstr
  • -
  • delobj
  • -
  • list
  • -
  • copy
  • -
-
-
Switches the module behaviour between
-
PUT: upload
-
GET: download
-
geturl: return download URL
-
getstr: download object as string
-
list: list keys
-
create: create bucket
-
delete: delete bucket
-
delobj: delete object
-
copy: copy object that is already stored in another bucket
-
-
- 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.
-
Must be a Boolean, always, never, different or latest.
-
true is the same as always.
-
false is equal to never.
-
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.
-
(GET mode only) When this is set to latest the last modified timestamp of local file is compared with the 'LastModified' of the object/key in S3.
-

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; although only the first one will be used during the initial upload of the file
-
-
- prefix - -
- string -
-
- Default:
""
-
-
Limits the response to keys that begin with the specified prefix for list mode.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_tags - -
- boolean -
-
added in 2.0.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to remove tags assigned to the S3 object if not specified in the playbook.
-
To remove all tags set tags to an empty dictionary in conjunction with this.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- src - -
- path -
-
- -
The source file path when performing a PUT operation.
-
Either content, content_base64 or src must be specified for a PUT operation. Ignored otherwise.
-
-
- tags - -
- dictionary -
-
added in 2.0.0
-
- -
Tags dict to apply to the S3 object.
-
-
- validate_bucket_name - -
- boolean -
-
added in 3.1.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether the bucket name should be validated to conform to AWS S3 naming rules.
-
On by default, this may be disabled for S3 backends that do not enforce these rules.
-
See https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- 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:: - - 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - - name: Simple PUT operation - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - src: /usr/local/myfile.txt - mode: put - - - name: PUT operation from a rendered template - amazon.aws.aws_s3: - bucket: mybucket - object: /object.yaml - content: "{{ lookup('template', 'templates/object.yaml.j2') }}" - 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 - - - name: Copy an object already stored in another bucket - amazon.aws.aws_s3: - bucket: mybucket - object: /my/desired/key.txt - mode: copy - copy_src: - bucket: srcbucket - object: /source/key.txt - - - -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) -- Alina Buzachis (@linabuzachis) diff --git a/docs/amazon.aws.aws_secret_lookup.rst b/docs/amazon.aws.aws_secret_lookup.rst deleted file mode 100644 index 9b7015ff786..00000000000 --- a/docs/amazon.aws.aws_secret_lookup.rst +++ /dev/null @@ -1,422 +0,0 @@ -.. _amazon.aws.aws_secret_lookup: - - -********************* -amazon.aws.aws_secret -********************* - -**Look up secrets stored in AWS Secrets Manager.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Look up secrets stored in AWS Secrets Manager provided the caller has the appropriate permissions to read the secret. -- Lookup is based on the secret's *Name* value. -- Optional parameters can be passed into this lookup; *version_id* and *version_stage* - - - -Requirements ------------- -The below requirements are needed on the local Ansible controller node that executes this lookup. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- _terms - -
- - - / required -
-
- - -
Name of the secret to look up in AWS Secrets Manager.
-
-
- aws_access_key - -
- string -
-
- -
env:EC2_ACCESS_KEY
-
env:AWS_ACCESS_KEY
-
env:AWS_ACCESS_KEY_ID
-
-
The AWS access key to use.
-

aliases: aws_access_key_id
-
-
- aws_profile - -
- string -
-
- -
env:AWS_DEFAULT_PROFILE
-
env:AWS_PROFILE
-
-
The AWS profile
-

aliases: boto_profile
-
-
- aws_secret_key - -
- string -
-
- -
env:EC2_SECRET_KEY
-
env:AWS_SECRET_KEY
-
env:AWS_SECRET_ACCESS_KEY
-
-
The AWS secret key that corresponds to the access key.
-

aliases: aws_secret_access_key
-
-
- aws_security_token - -
- string -
-
- -
env:EC2_SECURITY_TOKEN
-
env:AWS_SESSION_TOKEN
-
env:AWS_SECURITY_TOKEN
-
-
The AWS security token if using temporary access and secret keys.
-
-
- bypath - -
- boolean -
-
added in 1.4.0
-
- Default:
"no"
-
- -
A boolean to indicate whether the parameter is provided as a hierarchy.
-
-
- join - -
- boolean -
-
- Default:
"no"
-
- -
Join two or more entries to form an extended secret.
-
This is useful for overcoming the 4096 character limit imposed by AWS.
-
No effect when used with bypath.
-
-
- nested - -
- boolean -
-
added in 1.4.0
-
- Default:
"no"
-
- -
A boolean to indicate the secret contains nested values.
-
-
- on_deleted - -
- string -
-
added in 2.0.0
-
-
    Choices: -
  • error ←
  • -
  • skip
  • -
  • warn
  • -
-
- -
Action to take if the secret has been marked for deletion.
-
error will raise a fatal error when the secret has been marked for deletion.
-
skip will silently ignore the deleted secret.
-
warn will skip over the deleted secret but issue a warning.
-
-
- on_denied - -
- string -
-
-
    Choices: -
  • error ←
  • -
  • skip
  • -
  • warn
  • -
-
- -
Action to take if access to the secret is denied.
-
error will raise a fatal error when access to the secret is denied.
-
skip will silently ignore the denied secret.
-
warn will skip over the denied secret but issue a warning.
-
-
- on_missing - -
- string -
-
-
    Choices: -
  • error ←
  • -
  • skip
  • -
  • warn
  • -
-
- -
Action to take if the secret is missing.
-
error will raise a fatal error when the secret is missing.
-
skip will silently ignore the missing secret.
-
warn will skip over the missing secret but issue a warning.
-
-
- region - -
- string -
-
- -
env:EC2_REGION
-
env:AWS_REGION
-
-
The region for which to create the connection.
-
-
- version_id - -
- - -
-
- - -
Version of the secret(s).
-
-
- version_stage - -
- - -
-
- - -
Stage of the secret version.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - - name: lookup secretsmanager secret in the current region - debug: msg="{{ lookup('amazon.aws.aws_secret', '/path/to/secrets', bypath=true) }}" - - - name: Create RDS instance with aws_secret lookup for password param - rds: - command: create - instance_name: app-db - db_engine: MySQL - size: 10 - instance_type: db.m1.small - username: dbadmin - password: "{{ lookup('amazon.aws.aws_secret', 'DbSecret') }}" - tags: - Environment: staging - - - name: skip if secret does not exist - debug: msg="{{ lookup('amazon.aws.aws_secret', 'secret-not-exist', on_missing='skip')}}" - - - name: warn if access to the secret is denied - debug: msg="{{ lookup('amazon.aws.aws_secret', 'secret-denied', on_denied='warn')}}" - - - name: lookup secretsmanager secret in the current region using the nested feature - debug: msg="{{ lookup('amazon.aws.aws_secret', 'secrets.environments.production.password', nested=true) }}" - # The secret can be queried using the following syntax: `aws_secret_object_name.key1.key2.key3`. - # If an object is of the form `{"key1":{"key2":{"key3":1}}}` the query would return the value `1`. - - name: lookup secretsmanager secret in a specific region using specified region and aws profile using nested feature - debug: > - msg="{{ lookup('amazon.aws.aws_secret', 'secrets.environments.production.password', region=region, aws_profile=aws_profile, - aws_access_key=aws_access_key, aws_secret_key=aws_secret_key, nested=true) }}" - # The secret can be queried using the following syntax: `aws_secret_object_name.key1.key2.key3`. - # If an object is of the form `{"key1":{"key2":{"key3":1}}}` the query would return the value `1`. - # Region is the AWS region where the AWS secret is stored. - # AWS_profile is the aws profile to use, that has access to the AWS secret. - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this lookup: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- _raw - -
- - -
-
-
Returns the value of the secret stored in AWS Secrets Manager.
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Aaron Smith (!UNKNOWN) - - -.. 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_service_ip_ranges_lookup.rst b/docs/amazon.aws.aws_service_ip_ranges_lookup.rst deleted file mode 100644 index 0a1dc35179a..00000000000 --- a/docs/amazon.aws.aws_service_ip_ranges_lookup.rst +++ /dev/null @@ -1,162 +0,0 @@ -.. _amazon.aws.aws_service_ip_ranges_lookup: - - -******************************** -amazon.aws.aws_service_ip_ranges -******************************** - -**Look up the IP ranges for services provided in AWS such as EC2 and S3.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- AWS publishes IP ranges used on the public internet by EC2, S3, CloudFront, CodeBuild, Route53, and Route53 Health Checking. -- This module produces a list of all the ranges (by default) or can narrow down the list to the specified region or service. - - - -Requirements ------------- -The below requirements are needed on the local Ansible controller node that executes this lookup. - -- must have public internet connectivity - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- ipv6_prefixes - -
- - -
-
added in 2.1.0
-
- - -
When ipv6_prefixes=True the lookup will return ipv6 addresses instead of ipv4 addresses
-
-
- region - -
- - -
-
- - -
The AWS region to narrow the ranges to. Examples: us-east-1, eu-west-2, ap-southeast-1
-
-
- service - -
- - -
-
- - -
The service to filter ranges by. Options: EC2, S3, CLOUDFRONT, CODEbUILD, ROUTE53, ROUTE53_HEALTHCHECKS
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - vars: - ec2_ranges: "{{ lookup('aws_service_ip_ranges', region='ap-southeast-2', service='EC2', wantlist=True) }}" - tasks: - - - name: "use list return option and iterate as a loop" - debug: msg="{% for cidr in ec2_ranges %}{{ cidr }} {% endfor %}" - # "52.62.0.0/15 52.64.0.0/17 52.64.128.0/17 52.65.0.0/16 52.95.241.0/24 52.95.255.16/28 54.66.0.0/16 " - - - name: "Pull S3 IP ranges, and print the default return style" - debug: msg="{{ lookup('aws_service_ip_ranges', region='us-east-1', service='S3') }}" - # "52.92.16.0/20,52.216.0.0/15,54.231.0.0/17" - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this lookup: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- _raw - -
- - -
-
-
comma-separated list of CIDR ranges
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- James Turner (!UNKNOWN) - - -.. 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_ssm_lookup.rst b/docs/amazon.aws.aws_ssm_lookup.rst deleted file mode 100644 index 20c1be00214..00000000000 --- a/docs/amazon.aws.aws_ssm_lookup.rst +++ /dev/null @@ -1,269 +0,0 @@ -.. _amazon.aws.aws_ssm_lookup: - - -****************** -amazon.aws.aws_ssm -****************** - -**Get the value for a SSM parameter or all parameters under a path.** - - - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Get the value for an Amazon Simple Systems Manager parameter or a hierarchy of parameters. The first argument you pass the lookup can either be a parameter name or a hierarchy of parameters. Hierarchies start with a forward slash and end with the parameter name. Up to 5 layers may be specified. -- If looking up an explicitly listed parameter by name which does not exist then the lookup will return a None value which will be interpreted by Jinja2 as an empty string. You can use the ```default``` filter to give a default value in this case but must set the second parameter to true (see examples below) -- When looking up a path for parameters under it a dictionary will be returned for each path. If there is no parameter under that path then the return will be successful but the dictionary will be empty. -- If the lookup fails due to lack of permissions or due to an AWS client error then the aws_ssm will generate an error, normally crashing the current ansible task. This is normally the right thing since ignoring a value that IAM isn't giving access to could cause bigger problems and wrong behaviour or loss of data. If you want to continue in this case then you will have to set up two ansible tasks, one which sets a variable and ignores failures one which uses the value of that variable with a default. See the examples below. - - - -Requirements ------------- -The below requirements are needed on the local Ansible controller node that executes this lookup. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsConfigurationComments
-
- bypath - -
- boolean -
-
- Default:
"no"
-
- -
A boolean to indicate whether the parameter is provided as a hierarchy.
-
-
- decrypt - -
- boolean -
-
- Default:
"yes"
-
- -
A boolean to indicate whether to decrypt the parameter.
-
-
- endpoint - -
- string -
-
added in 3.3.0
-
- - -
Use a custom endpoint when connecting to SSM service.
-
-
- on_denied - -
- string -
-
added in 2.0.0
-
-
    Choices: -
  • error ←
  • -
  • skip
  • -
  • warn
  • -
-
- -
Action to take if access to the SSM parameter is denied.
-
error will raise a fatal error when access to the SSM parameter is denied.
-
skip will silently ignore the denied SSM parameter.
-
warn will skip over the denied SSM parameter but issue a warning.
-
-
- on_missing - -
- string -
-
added in 2.0.0
-
-
    Choices: -
  • error ←
  • -
  • skip
  • -
  • warn
  • -
-
- -
Action to take if the SSM parameter is missing.
-
error will raise a fatal error when the SSM parameter is missing.
-
skip will silently ignore the missing SSM parameter.
-
warn will skip over the missing SSM parameter but issue a warning.
-
-
- recursive - -
- boolean -
-
- Default:
"no"
-
- -
A boolean to indicate whether to retrieve all parameters within a hierarchy.
-
-
- shortnames - -
- boolean -
-
- Default:
"no"
-
- -
Indicates whether to return the name only without path if using a parameter hierarchy.
-
-
- - - - -Examples --------- - -.. code-block:: yaml - - # lookup sample: - - name: lookup ssm parameter store in the current region - debug: msg="{{ lookup('aws_ssm', 'Hello' ) }}" - - - name: lookup ssm parameter store in nominated region - debug: msg="{{ lookup('aws_ssm', 'Hello', region='us-east-2' ) }}" - - - name: lookup ssm parameter store without decrypted - debug: msg="{{ lookup('aws_ssm', 'Hello', decrypt=False ) }}" - - - name: lookup ssm parameter store in nominated aws profile - debug: msg="{{ lookup('aws_ssm', 'Hello', aws_profile='myprofile' ) }}" - - - name: lookup ssm parameter store using explicit aws credentials - debug: msg="{{ lookup('aws_ssm', 'Hello', aws_access_key=my_aws_access_key, aws_secret_key=my_aws_secret_key, aws_security_token=my_security_token ) }}" - - - name: lookup ssm parameter store with all options. - debug: msg="{{ lookup('aws_ssm', 'Hello', decrypt=false, region='us-east-2', aws_profile='myprofile') }}" - - - name: lookup a key which doesn't exist, returns "" - debug: msg="{{ lookup('aws_ssm', 'NoKey') }}" - - - name: lookup a key which doesn't exist, returning a default ('root') - debug: msg="{{ lookup('aws_ssm', 'AdminID') | default('root', true) }}" - - - name: lookup a key which doesn't exist failing to store it in a fact - set_fact: - temp_secret: "{{ lookup('aws_ssm', '/NoAccess/hiddensecret') }}" - ignore_errors: true - - - name: show fact default to "access failed" if we don't have access - debug: msg="{{ 'the secret was:' ~ temp_secret | default('could not access secret') }}" - - - name: return a dictionary of ssm parameters from a hierarchy path - debug: msg="{{ lookup('aws_ssm', '/PATH/to/params', region='ap-southeast-2', bypath=true, recursive=true ) }}" - - - name: return a dictionary of ssm parameters from a hierarchy path with shortened names (param instead of /PATH/to/param) - debug: msg="{{ lookup('aws_ssm', '/PATH/to/params', region='ap-southeast-2', shortnames=true, bypath=true, recursive=true ) }}" - - - name: Iterate over a parameter hierarchy (one iteration per parameter) - debug: msg='Key contains {{ item.key }} , with value {{ item.value }}' - loop: '{{ lookup("aws_ssm", "/demo/", region="ap-southeast-2", bypath=True) | dict2items }}' - - - name: Iterate over multiple paths as dictionaries (one iteration per path) - debug: msg='Path contains {{ item }}' - loop: '{{ lookup("aws_ssm", "/demo/", "/demo1/", bypath=True)}}' - - - name: lookup ssm parameter and fail if missing - debug: msg="{{ lookup('aws_ssm', 'missing-parameter', on_missing="error" ) }}" - - - name: lookup ssm parameter warn if access is denied - debug: msg="{{ lookup('aws_ssm', 'missing-parameter', on_denied="warn" ) }}" - - - - -Status ------- - - -Authors -~~~~~~~ - -- Bill Wang (!UNKNOWN) -- Marat Bakeev (!UNKNOWN) -- Michael De La Rue (!UNKNOWN) - - -.. 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_module.rst b/docs/amazon.aws.cloudformation_info_module.rst deleted file mode 100644 index 02aac22165c..00000000000 --- a/docs/amazon.aws.cloudformation_info_module.rst +++ /dev/null @@ -1,575 +0,0 @@ -.. _amazon.aws.cloudformation_info_module: - - -****************************** -amazon.aws.cloudformation_info -****************************** - -**Obtain information about an AWS CloudFormation stack** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gets information about an AWS CloudFormation stack. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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 communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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'] }}" - - # 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 info 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_resources is true and the stack exists -
Describes stack resources for the stack
-
-
-
- stack_resources - -
- dictionary -
-
only if all_facts or stack_resources 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) diff --git a/docs/amazon.aws.cloudformation_module.rst b/docs/amazon.aws.cloudformation_module.rst deleted file mode 100644 index a930f028004..00000000000 --- a/docs/amazon.aws.cloudformation_module.rst +++ /dev/null @@ -1,871 +0,0 @@ -.. _amazon.aws.cloudformation_module: - - -************************* -amazon.aws.cloudformation -************************* - -**Create or delete an AWS CloudFormation stack** - - -Version added: 1.0.0 - -.. 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. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- stack_name - -
- string - / required -
-
- -
Name of the CloudFormation stack.
-
-
- stack_policy - -
- string -
-
- -
The path of the file containing 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
-
-
- stack_policy_body - -
- json -
-
added in 1.5.0
-
- -
The CloudFormation stack policy in JSON. 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
-
-
- stack_policy_on_update_body - -
- json -
-
added in 1.5.0
-
- -
the body of the cloudformation stack policy only applied during this update.
-
-
- 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.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - - 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) diff --git a/docs/amazon.aws.ec2_ami_info_module.rst b/docs/amazon.aws.ec2_ami_info_module.rst deleted file mode 100644 index 114ef035829..00000000000 --- a/docs/amazon.aws.ec2_ami_info_module.rst +++ /dev/null @@ -1,801 +0,0 @@ -.. _amazon.aws.ec2_ami_info_module: - - -*********************** -amazon.aws.ec2_ami_info -*********************** - -**Gather information about ec2 AMIs** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 AMIs - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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) diff --git a/docs/amazon.aws.ec2_ami_module.rst b/docs/amazon.aws.ec2_ami_module.rst deleted file mode 100644 index 8effa1e7cd3..00000000000 --- a/docs/amazon.aws.ec2_ami_module.rst +++ /dev/null @@ -1,1178 +0,0 @@ -.. _amazon.aws.ec2_ami_module: - - -****************** -amazon.aws.ec2_ami -****************** - -**Create or destroy an image (AMI) in ec2** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Registers or deregisters ec2 images. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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 - / required -
-
- -
The device name. For example /dev/sda.
-

aliases: DeviceName
-
-
- 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.
-
Alias NoDevice has been deprecated and will be removed after 2022-06-01.
-

aliases: NoDevice
-
-
- snapshot_id - -
- string -
-
- -
The ID of the Snapshot.
-
-
- virtual_name - -
- string -
-
- -
The virtual name for the device.
- -
Alias VirtualName has been deprecated and will be removed after 2022-06-01.
-

aliases: VirtualName
-
-
- 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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 communication with the AWS APIs.
-
-
- 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:
1200
-
-
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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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) diff --git a/docs/amazon.aws.ec2_eni_info_module.rst b/docs/amazon.aws.ec2_eni_info_module.rst deleted file mode 100644 index 98027a059ac..00000000000 --- a/docs/amazon.aws.ec2_eni_info_module.rst +++ /dev/null @@ -1,726 +0,0 @@ -.. _amazon.aws.ec2_eni_info_module: - - -*********************** -amazon.aws.ec2_eni_info -*********************** - -**Gather information about ec2 ENI interfaces in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 ENI interfaces in AWS. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- eni_id - -
- string -
-
added in 1.3.0
-
- -
The ID of the ENI.
-
This option is mutually exclusive of filters.
-
-
- 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.
-
This option is mutually exclusive of eni_id.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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 -
-
When an ENI is associated with an EIP -
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 -
-
When an ENI is attached to an ec2 instance -
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
-
  -
- name - -
- string -
-
added in 1.3.0
-
When a Name tag has been set -
The Name tag of the ENI, often displayed in the AWS UIs as Name
-
-
  -
- 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
-
-
  -
- tags - -
- dictionary -
-
added in 1.3.0
-
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) diff --git a/docs/amazon.aws.ec2_eni_module.rst b/docs/amazon.aws.ec2_eni_module.rst deleted file mode 100644 index bbddfc98bc6..00000000000 --- a/docs/amazon.aws.ec2_eni_module.rst +++ /dev/null @@ -1,934 +0,0 @@ -.. _amazon.aws.ec2_eni_module: - - -****************** -amazon.aws.ec2_eni -****************** - -**Create and optionally attach an Elastic Network Interface (ENI) to an instance** - - -Version added: 1.0.0 - -.. 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 >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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.
-
-
- name - -
- string -
-
- -
Name for the ENI. This will create a tag called "Name" with the value assigned here.
-
This can be used in conjunction with subnet_id as another means of identifiying a network interface.
-
AWS does not enforce unique Name tags, so duplicate names are possible if you configure it that way. If that is the case, you will need to provide other identifying information such as private_ip_address or eni_id.
-
-
- private_ip_address - -
- string -
-
- -
Private IP address.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
-
- purge_tags - -
- boolean -
-
added in 1.3.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Indicates whether to remove tags not specified in tags or name. This means you have to specify all the desired tags on each task affecting a network interface.
-
If tags is omitted or None this option is disregarded.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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.
-
-
- tags - -
- dictionary -
-
added in 1.3.0
-
- -
A hash/dictionary of tags to add to the new ENI or to add/remove from an existing one. Please note that the name field sets the "Name" tag.
-
To clear all tags, set this option to an empty dictionary to use in conjunction with purge_tags. If you provide name, that tag will not be removed.
-
To prevent removing any tags set purge_tags to false.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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 using name and subnet_id - - amazon.aws.ec2_eni: - name: eni-20 - subnet_id: subnet-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
-
  -
- name - -
- string -
-
-
The name of the ENI
-
-
Sample:
-
my-eni-20
-
  -
- 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
-
  -
- tags - -
- dictionary -
-
-
The dictionary of tags associated with the ENI
-
-
Sample:
-
{'Name': 'my-eni', 'group': 'Finance'}
-
  -
- vpc_id - -
- string -
-
-
which vpc this network interface is bound
-
-
Sample:
-
vpc-9a9a9da
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) -- Mike Healey (@healem) diff --git a/docs/amazon.aws.ec2_group_info_module.rst b/docs/amazon.aws.ec2_group_info_module.rst deleted file mode 100644 index 6ed74e1c653..00000000000 --- a/docs/amazon.aws.ec2_group_info_module.rst +++ /dev/null @@ -1,342 +0,0 @@ -.. _amazon.aws.ec2_group_info_module: - - -************************* -amazon.aws.ec2_group_info -************************* - -**Gather information about ec2 security groups in AWS.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 security groups in AWS. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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) diff --git a/docs/amazon.aws.ec2_group_module.rst b/docs/amazon.aws.ec2_group_module.rst deleted file mode 100644 index 89161ea9583..00000000000 --- a/docs/amazon.aws.ec2_group_module.rst +++ /dev/null @@ -1,1051 +0,0 @@ -.. _amazon.aws.ec2_group_module: - - -******************** -amazon.aws.ec2_group -******************** - -**maintain an ec2 VPC security group.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Maintains ec2 security groups. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- group_id - -
- string -
-
- -
Id of group to delete (works only with absent).
-
One of and only one of name or group_id is required.
-
-
- name - -
- string -
-
- -
Name of the security group.
-
One of and only one of name or group_id is required.
-
Required if state=present.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_rules - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
- Default:
"true"
-
-
Purge existing rules on security group that are not found in rules.
-
-
- purge_rules_egress - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
- Default:
"true"
-
-
Purge existing rules_egress on security group that are not found in rules_egress.
-
-
- purge_tags - -
- boolean -
-
-
    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 - / elements=dictionary -
-
- -
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.
-
-
- cidr_ip - -
- string -
-
- -
The IPv4 CIDR range traffic is coming from.
-
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- cidr_ipv6 - -
- string -
-
- -
The IPv6 CIDR range traffic is coming from.
-
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- from_port - -
- integer -
-
- -
The start of the range of ports that traffic is coming from.
-
A value can be between 0 to 65535.
-
A value of -1 indicates all ports (only supported when proto=icmp).
-
-
- group_desc - -
- string -
-
- -
If the group_name is set and the Security Group doesn't exist a new Security Group will be created with group_desc as the description.
-
-
- group_id - -
- string -
-
- -
The ID of the Security Group that traffic is coming from.
-
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- group_name - -
- string -
-
- -
Name of the Security Group that traffic is coming from.
-
If the Security Group doesn't exist a new Security Group will be created with group_desc as the description.
-
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- ip_prefix - -
- string -
-
- - -
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- proto - -
- string -
-
- -
The IP protocol name (tcp, udp, icmp, icmpv6) or number (https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers)
-
-
- rule_desc - -
- string -
-
- -
A description for the rule.
-
-
- to_port - -
- integer -
-
- -
The end of the range of ports that traffic is coming from.
-
A value can be between 0 to 65535.
-
A value of -1 indicates all ports (only supported when proto=icmp).
-
-
- rules_egress - -
- list - / elements=dictionary -
-
- -
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.
-
-
- cidr_ip - -
- string -
-
- -
The IPv4 CIDR range traffic is going to.
-
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- cidr_ipv6 - -
- string -
-
- -
The IPv6 CIDR range traffic is going to.
-
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- from_port - -
- integer -
-
- -
The start of the range of ports that traffic is going to.
-
A value can be between 0 to 65535.
-
A value of -1 indicates all ports (only supported when proto=icmp).
-
-
- group_desc - -
- string -
-
- -
If the group_name is set and the Security Group doesn't exist a new Security Group will be created with group_desc as the description.
-
-
- group_id - -
- string -
-
- -
The ID of the Security Group that traffic is going to.
-
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- group_name - -
- string -
-
- -
Name of the Security Group that traffic is going to.
-
If the Security Group doesn't exist a new Security Group will be created with group_desc as the description.
-
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- ip_prefix - -
- string -
-
- - -
You can specify only one of cidr_ip, cidr_ipv6, ip_prefix, group_id and group_name.
-
-
- proto - -
- string -
-
- -
The IP protocol name (tcp, udp, icmp, icmpv6) or number (https://en.wikipedia.org/wiki/List_of_IP_protocol_numbers)
-
-
- rule_desc - -
- string -
-
- -
A description for the rule.
-
-
- to_port - -
- integer -
-
- -
The end of the range of ports that traffic is going to.
-
A value can be between 0 to 65535.
-
A value of -1 indicates all ports (only supported when proto=icmp).
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Create or delete a security group.
-
-
- tags - -
- dictionary -
-
- -
A dictionary of one or more tags to assign to the security group.
-

aliases: resource_tags
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- vpc_id - -
- string -
-
- -
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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - - name: example using security group rule descriptions - amazon.aws.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 - amazon.aws.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 (only supported when I(proto=icmp)), 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 - amazon.aws.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" - amazon.aws.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': '198.51.100.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) diff --git a/docs/amazon.aws.ec2_instance_info_module.rst b/docs/amazon.aws.ec2_instance_info_module.rst deleted file mode 100644 index 83018c0315c..00000000000 --- a/docs/amazon.aws.ec2_instance_info_module.rst +++ /dev/null @@ -1,1886 +0,0 @@ -.. _amazon.aws.ec2_instance_info_module: - - -**************************** -amazon.aws.ec2_instance_info -**************************** - -**Gather information about ec2 instances in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 instances in AWS - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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_DescribeInstances.html for possible filters. Filter names and values are case sensitive.
-
-
- instance_ids - -
- list - / elements=string -
-
- -
If you specify one or more instance IDs, only instances that have the specified IDs are returned.
-
-
- minimum_uptime - -
- integer -
-
- -
Minimum running uptime in minutes of instances. For example if uptime is 60 return all instances that have run more than 60 minutes.
-

aliases: uptime
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Gather information about all instances - amazon.aws.ec2_instance_info: - - - name: Gather information about all instances in AZ ap-southeast-2a - amazon.aws.ec2_instance_info: - filters: - availability-zone: ap-southeast-2a - - - name: Gather information about a particular instance using ID - amazon.aws.ec2_instance_info: - instance_ids: - - i-12345678 - - - name: Gather information about any instance with a tag key Name and value Example - amazon.aws.ec2_instance_info: - filters: - "tag:Name": Example - - - name: Gather information about any instance in states "shutting-down", "stopping", "stopped" - amazon.aws.ec2_instance_info: - filters: - instance-state-name: [ "shutting-down", "stopping", "stopped" ] - - - name: Gather information about any instance with Name beginning with RHEL and an uptime of at least 60 minutes - amazon.aws.ec2_instance_info: - region: "{{ ec2_region }}" - uptime: 60 - filters: - "tag:Name": "RHEL-*" - instance-state-name: [ "running"] - register: ec2_node_info - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- instances - -
- complex -
-
always -
a list of ec2 instances
-
-
  -
- ami_launch_index - -
- integer -
-
always -
The AMI launch index, which can be used to find this instance in the launch group.
-
-
  -
- architecture - -
- string -
-
always -
The architecture of the image
-
-
Sample:
-
x86_64
-
  -
- block_device_mappings - -
- complex -
-
always -
Any block device mapping entries for the instance.
-
-
   -
- device_name - -
- string -
-
always -
The device name exposed to the instance (for example, /dev/sdh or xvdh).
-
-
Sample:
-
/dev/sdh
-
   -
- ebs - -
- complex -
-
always -
Parameters used to automatically set up EBS volumes when the instance is launched.
-
-
    -
- attach_time - -
- string -
-
always -
The time stamp when the attachment initiated.
-
-
Sample:
-
2017-03-23T22:51:24+00:00
-
    -
- delete_on_termination - -
- boolean -
-
always -
Indicates whether the volume is deleted on instance termination.
-
-
Sample:
-
True
-
    -
- status - -
- string -
-
always -
The attachment state.
-
-
Sample:
-
attached
-
    -
- volume_id - -
- string -
-
always -
The ID of the EBS volume
-
-
Sample:
-
vol-12345678
-
  -
- client_token - -
- string -
-
always -
The idempotency token you provided when you launched the instance, if applicable.
-
-
Sample:
-
mytoken
-
  -
- cpu_options - -
- complex -
-
always -
The CPU options set for the instance.
-
-
   -
- core_count - -
- integer -
-
always -
The number of CPU cores for the instance.
-
-
Sample:
-
1
-
   -
- threads_per_core - -
- integer -
-
always -
The number of threads per CPU core. On supported instance, a value of 1 means Intel Hyper-Threading Technology is disabled.
-
-
Sample:
-
1
-
  -
- ebs_optimized - -
- boolean -
-
always -
Indicates whether the instance is optimized for EBS I/O.
-
-
  -
- hypervisor - -
- string -
-
always -
The hypervisor type of the instance.
-
-
Sample:
-
xen
-
  -
- iam_instance_profile - -
- complex -
-
always -
The IAM instance profile associated with the instance, if applicable.
-
-
   -
- arn - -
- string -
-
always -
The Amazon Resource Name (ARN) of the instance profile.
-
-
Sample:
-
arn:aws:iam::000012345678:instance-profile/myprofile
-
   -
- id - -
- string -
-
always -
The ID of the instance profile
-
-
Sample:
-
JFJ397FDG400FG9FD1N
-
  -
- image_id - -
- string -
-
always -
The ID of the AMI used to launch the instance.
-
-
Sample:
-
ami-0011223344
-
  -
- instance_id - -
- string -
-
always -
The ID of the instance.
-
-
Sample:
-
i-012345678
-
  -
- instance_type - -
- string -
-
always -
The instance type size of the running instance.
-
-
Sample:
-
t2.micro
-
  -
- key_name - -
- string -
-
always -
The name of the key pair, if this instance was launched with an associated key pair.
-
-
Sample:
-
my-key
-
  -
- launch_time - -
- string -
-
always -
The time the instance was launched.
-
-
Sample:
-
2017-03-23T22:51:24+00:00
-
  -
- monitoring - -
- complex -
-
always -
The monitoring for the instance.
-
-
   -
- state - -
- string -
-
always -
Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
-
-
Sample:
-
disabled
-
  -
- network_interfaces - -
- complex -
-
always -
One or more network interfaces for the instance.
-
-
   -
- association - -
- complex -
-
always -
The association information for an Elastic IPv4 associated with the network interface.
-
-
    -
- ip_owner_id - -
- string -
-
always -
The ID of the owner of the Elastic IP address.
-
-
Sample:
-
amazon
-
    -
- public_dns_name - -
- string -
-
always -
The public DNS name.
-
-
    -
- public_ip - -
- string -
-
always -
The public IP address or Elastic IP address bound to the network interface.
-
-
Sample:
-
1.2.3.4
-
   -
- attachment - -
- complex -
-
always -
The network interface attachment.
-
-
    -
- attach_time - -
- string -
-
always -
The time stamp when the attachment initiated.
-
-
Sample:
-
2017-03-23T22:51:24+00:00
-
    -
- attachment_id - -
- string -
-
always -
The ID of the network interface attachment.
-
-
Sample:
-
eni-attach-3aff3f
-
    -
- delete_on_termination - -
- boolean -
-
always -
Indicates whether the network interface is deleted when the instance is terminated.
-
-
Sample:
-
True
-
    -
- device_index - -
- integer -
-
always -
The index of the device on the instance for the network interface attachment.
-
-
    -
- status - -
- string -
-
always -
The attachment state.
-
-
Sample:
-
attached
-
   -
- description - -
- string -
-
always -
The description.
-
-
Sample:
-
My interface
-
   -
- groups - -
- list - / elements=dictionary -
-
always -
One or more security groups.
-
-
    -
- group_id - -
- string -
-
always -
The ID of the security group.
-
-
Sample:
-
sg-abcdef12
-
    -
- group_name - -
- string -
-
always -
The name of the security group.
-
-
Sample:
-
mygroup
-
   -
- ipv6_addresses - -
- list - / elements=dictionary -
-
always -
One or more IPv6 addresses associated with the network interface.
-
-
    -
- ipv6_address - -
- string -
-
always -
The IPv6 address.
-
-
Sample:
-
2001:0db8:85a3:0000:0000:8a2e:0370:7334
-
   -
- mac_address - -
- string -
-
always -
The MAC address.
-
-
Sample:
-
00:11:22:33:44:55
-
   -
- network_interface_id - -
- string -
-
always -
The ID of the network interface.
-
-
Sample:
-
eni-01234567
-
   -
- owner_id - -
- string -
-
always -
The AWS account ID of the owner of the network interface.
-
-
Sample:
-
01234567890
-
   -
- private_ip_address - -
- string -
-
always -
The IPv4 address of the network interface within the subnet.
-
-
Sample:
-
10.0.0.1
-
   -
- private_ip_addresses - -
- list - / elements=dictionary -
-
always -
The private IPv4 addresses associated with the network interface.
-
-
    -
- association - -
- complex -
-
always -
The association information for an Elastic IP address (IPv4) associated with the network interface.
-
-
     -
- ip_owner_id - -
- string -
-
always -
The ID of the owner of the Elastic IP address.
-
-
Sample:
-
amazon
-
     -
- public_dns_name - -
- string -
-
always -
The public DNS name.
-
-
     -
- public_ip - -
- string -
-
always -
The public IP address or Elastic IP address bound to the network interface.
-
-
Sample:
-
1.2.3.4
-
    -
- primary - -
- boolean -
-
always -
Indicates whether this IPv4 address is the primary private IP address of the network interface.
-
-
Sample:
-
True
-
    -
- private_ip_address - -
- string -
-
always -
The private IPv4 address of the network interface.
-
-
Sample:
-
10.0.0.1
-
   -
- source_dest_check - -
- boolean -
-
always -
Indicates whether source/destination checking is enabled.
-
-
Sample:
-
True
-
   -
- status - -
- string -
-
always -
The status of the network interface.
-
-
Sample:
-
in-use
-
   -
- subnet_id - -
- string -
-
always -
The ID of the subnet for the network interface.
-
-
Sample:
-
subnet-0123456
-
   -
- vpc_id - -
- string -
-
always -
The ID of the VPC for the network interface.
-
-
Sample:
-
vpc-0123456
-
  -
- placement - -
- complex -
-
always -
The location where the instance launched, if applicable.
-
-
   -
- availability_zone - -
- string -
-
always -
The Availability Zone of the instance.
-
-
Sample:
-
ap-southeast-2a
-
   -
- group_name - -
- string -
-
always -
The name of the placement group the instance is in (for cluster compute instances).
-
-
   -
- tenancy - -
- string -
-
always -
The tenancy of the instance (if the instance is running in a VPC).
-
-
Sample:
-
default
-
  -
- private_dns_name - -
- string -
-
always -
The private DNS name.
-
-
Sample:
-
ip-10-0-0-1.ap-southeast-2.compute.internal
-
  -
- private_ip_address - -
- string -
-
always -
The IPv4 address of the network interface within the subnet.
-
-
Sample:
-
10.0.0.1
-
  -
- product_codes - -
- list - / elements=dictionary -
-
always -
One or more product codes.
-
-
   -
- product_code_id - -
- string -
-
always -
The product code.
-
-
Sample:
-
aw0evgkw8ef3n2498gndfgasdfsd5cce
-
   -
- product_code_type - -
- string -
-
always -
The type of product code.
-
-
Sample:
-
marketplace
-
  -
- public_dns_name - -
- string -
-
always -
The public DNS name assigned to the instance.
-
-
  -
- public_ip_address - -
- string -
-
always -
The public IPv4 address assigned to the instance
-
-
Sample:
-
52.0.0.1
-
  -
- 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
-
  -
- security_groups - -
- list - / elements=dictionary -
-
always -
One or more security groups for the instance.
-
-
   -
- group_id - -
- string -
-
always -
The ID of the security group.
-
-
Sample:
-
sg-0123456
-
   -
- group_name - -
- string -
-
always -
The name of the security group.
-
-
Sample:
-
my-security-group
-
  -
- source_dest_check - -
- boolean -
-
always -
Indicates whether source/destination checking is enabled.
-
-
Sample:
-
True
-
  -
- state - -
- complex -
-
always -
The current state of the instance.
-
-
   -
- code - -
- integer -
-
always -
The low byte represents the state.
-
-
Sample:
-
16
-
   -
- name - -
- string -
-
always -
The name of the state.
-
-
Sample:
-
running
-
  -
- state_transition_reason - -
- string -
-
always -
The reason for the most recent state transition.
-
-
  -
- subnet_id - -
- string -
-
always -
The ID of the subnet in which the instance is running.
-
-
Sample:
-
subnet-00abcdef
-
  -
- tags - -
- dictionary -
-
always -
Any tags assigned to the instance.
-
-
  -
- virtualization_type - -
- string -
-
always -
The type of virtualization of the AMI.
-
-
Sample:
-
hvm
-
  -
- vpc_id - -
- dictionary -
-
always -
The ID of the VPC the instance is in.
-
-
Sample:
-
vpc-0011223344
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Michael Schuett (@michaeljs1990) -- Rob White (@wimnat) diff --git a/docs/amazon.aws.ec2_instance_module.rst b/docs/amazon.aws.ec2_instance_module.rst deleted file mode 100644 index 8457d32dc7b..00000000000 --- a/docs/amazon.aws.ec2_instance_module.rst +++ /dev/null @@ -1,2891 +0,0 @@ -.. _amazon.aws.ec2_instance_module: - - -*********************** -amazon.aws.ec2_instance -*********************** - -**Create & manage EC2 instances** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Create and manage AWS EC2 instances. -- Note: This module does not support creating `EC2 Spot instances `_. The :ref:`amazon.aws.ec2 ` module can create and manage spot instances. - - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- availability_zone - -
- string -
-
- -
Specify an availability zone to use the default subnet it. Useful if not specifying the vpc_subnet_id parameter.
-
If no subnet, ENI, or availability zone is provided, the default subnet in the default VPC will be used in the first AZ (alphabetically sorted).
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_secret_key, secret_key
-
-
- count - -
- integer -
-
added in 2.2.0
-
- -
Number of instances to launch.
-
Setting this value will result in always launching new instances.
-
Mutually exclusive with exact_count.
-
-
- cpu_credit_specification - -
- string -
-
-
    Choices: -
  • unlimited
  • -
  • standard
  • -
-
-
For T series instances, choose whether to allow increased charges to buy CPU credits if the default pool is depleted.
-
Choose unlimited to enable buying additional CPU credits.
-
-
- cpu_options - -
- dictionary -
-
- -
Reduce the number of vCPU exposed to the instance.
-
Those parameters can only be set at instance launch. The two suboptions threads_per_core and core_count are mandatory.
- -
-
- core_count - -
- integer - / required -
-
- -
Set the number of core to enable.
-
-
- threads_per_core - -
- integer - / required -
-
-
    Choices: -
  • 1
  • -
  • 2
  • -
-
-
Select the number of threads per core to enable. Disable or Enable Intel HT.
-
-
- 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.
-
-
- detailed_monitoring - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether to allow detailed cloudwatch metrics to be collected, enabling more detailed alerting.
-
-
- ebs_optimized - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether instance is should use 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- exact_count - -
- integer -
-
added in 2.2.0
-
- -
An integer value which indicates how many instances that match the filters parameter should be running.
-
Instances are either created or terminated based on this value.
-
If termination takes place, least recently created instances will be terminated based on Launch Time.
-
Mutually exclusive with count, instance_ids.
-
-
- filters - -
- dictionary -
-
- -
A dict of filters to apply when deciding whether existing instances match and should be altered. Each dict item consists of a filter key and a filter value. See https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html. for possible filters. Filter names and values are case sensitive.
-
By default, instances are filtered for counting by their "Name" tag, base AMI, state (running, by default), and subnet ID. Any queryable filter can be used. Good candidates are specific tags, SSH keys, or security groups.
-
-
- image - -
- dictionary -
-
- -
An image to use for the instance. The amazon.aws.ec2_ami_info module may be used to retrieve images. One of image or image_id are required when instance is not already present.
-
-
- id - -
- string -
-
- -
The AMI ID.
-
-
- kernel - -
- - -
-
- -
a string AKI to override the AMI kernel.
-
-
- ramdisk - -
- string -
-
- -
Overrides the AMI's default ramdisk ID.
-
-
- image_id - -
- string -
-
- -
ami ID to use for the instance. One of image or image_id are required when instance is not already present.
-
This is an alias for image.id.
-
-
- instance_ids - -
- list - / elements=string -
-
- -
If you specify one or more instance IDs, only instances that have the specified IDs are returned.
-
Mutually exclusive with exact_count.
-
-
- instance_initiated_shutdown_behavior - -
- string -
-
-
    Choices: -
  • stop
  • -
  • terminate
  • -
-
-
Whether to stop or terminate an instance upon shutdown.
-
-
- instance_role - -
- string -
-
- -
The ARN or name of an EC2-enabled instance role to be used. If a name is not provided in arn format then the ListInstanceProfiles permission must also be granted. https://docs.aws.amazon.com/IAM/latest/APIReference/API_ListInstanceProfiles.html If no full ARN is provided, the role with a matching name will be used from the active AWS account.
-
-
- instance_type - -
- string -
-
- -
Instance type to use for the instance, see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html Only required when instance is not already present.
-
If not specified, t2.micro will be used.
-
-
- key_name - -
- string -
-
- -
Name of the SSH access key to assign to the instance - must exist in the region the instance is created.
-
-
- launch_template - -
- dictionary -
-
- -
The EC2 launch template to base instance configuration on.
-
-
- id - -
- string -
-
- -
the ID of the launch template (optional if name is specified).
-
-
- name - -
- string -
-
- -
the pretty name of the launch template (optional if id is specified).
-
-
- version - -
- - -
-
- -
the specific version of the launch template to use. If unspecified, the template default is chosen.
-
-
- metadata_options - -
- dictionary -
-
added in 2.0.0
-
- -
Modify the metadata options for the instance.
- -
The two suboptions http_endpoint and http_tokens are supported.
-
-
- http_endpoint - -
- string -
-
-
    Choices: -
  • enabled ←
  • -
  • disabled
  • -
-
-
Enables or disables the HTTP metadata endpoint on instances.
-
If specified a value of disabled, metadata of the instance will not be accessible.
-
-
- http_tokens - -
- string -
-
-
    Choices: -
  • optional ←
  • -
  • required
  • -
-
-
Set the state of token usage for instance metadata requests.
-
If the state is optional (v1 and v2), instance metadata can be retrieved with or without a signed token header on request.
-
If the state is required (v2), a signed token header must be sent with any instance metadata retrieval requests.
-
-
- name - -
- string -
-
- -
The Name tag for the instance.
-
-
- network - -
- dictionary -
-
- -
Either a dictionary containing the key 'interfaces' corresponding to a list of network interface IDs or containing specifications for a single network interface.
-
Use the amazon.aws.ec2_eni module to create ENIs with special settings.
-
-
- assign_public_ip - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
when true assigns a public IP address to the interface
-
-
- delete_on_termination - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Delete the interface when the instance it is attached to is terminated.
-
-
- description - -
- string -
-
- -
a description for the network interface
-
-
- device_index - -
- integer -
-
- -
The index of the interface to modify
-
-
- groups - -
- list - / elements=string -
-
- -
a list of security group IDs to attach to the interface
-
-
- interfaces - -
- list - / elements=string -
-
- -
a list of ENI IDs (strings) or a list of objects containing the key id.
-
-
- ipv6_addresses - -
- list - / elements=string -
-
- -
a list of IPv6 addresses to assign to the network interface
-
-
- private_ip_address - -
- string -
-
- -
an IPv4 address to assign to the interface
-
-
- private_ip_addresses - -
- list - / elements=string -
-
- -
a list of IPv4 addresses to assign to the network interface
-
-
- source_dest_check - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
controls whether source/destination checking is enabled on the interface
-
-
- subnet_id - -
- string -
-
- -
the subnet to connect the network interface to
-
-
- placement_group - -
- string -
-
- -
The placement group that needs to be assigned to the instance
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_tags - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Delete any tags not specified in the task that are on the instance. This means you have to specify all the desired tags on each task affecting an 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_group - -
- string -
-
- -
A security group ID or name. Mutually exclusive with security_groups.
-
-
- security_groups - -
- list - / elements=string -
-
- -
A list of security group IDs or names (strings). Mutually exclusive with security_group.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • terminated
  • -
  • running
  • -
  • started
  • -
  • stopped
  • -
  • restarted
  • -
  • rebooted
  • -
  • absent
  • -
-
-
Goal state for the instances.
-
state=present: ensures instances exist, but does not guarantee any state (e.g. running). Newly-launched instances will be run by EC2.
-
state=running: state=present + ensures the instances are running
-
state=started: state=running + waits for EC2 status checks to report OK if wait=true
-
state=stopped: ensures an existing instance is stopped.
-
state=rebooted: convenience alias for state=stopped immediately followed by state=running
-
state=restarted: convenience alias for state=stopped immediately followed by state=started
-
state=terminated: ensures an existing instance is terminated.
-
state=absent: alias for state=terminated
-
-
- tags - -
- dictionary -
-
- -
A hash/dictionary of tags to add to the new instance or to add/remove from an existing one.
-
-
- tenancy - -
- string -
-
-
    Choices: -
  • dedicated
  • -
  • default
  • -
-
-
What type of tenancy to allow an instance to use. Default is shared tenancy. Dedicated tenancy will incur additional charges.
-
-
- termination_protection - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Whether to enable termination protection. This module will not terminate an instance with termination protection active, it must be turned off first.
-
-
- tower_callback - -
- dictionary -
-
- -
Preconfigured user-data to enable an instance to perform a Tower callback (Linux only).
-
Mutually exclusive with user_data.
-
For Windows instances, to enable remote access via Ansible set tower_callback.windows to true, and optionally set an admin password.
-
If using 'windows' and 'set_password', callback to Tower will not be performed but the instance will be ready to receive winrm connections from Ansible.
-
-
- host_config_key - -
- string -
-
- -
Host configuration secret key generated by the Tower job template.
-
-
- job_template_id - -
- string -
-
- -
Either the integer ID of the Tower Job Template, or the name (name supported only for Tower 3.2+).
-
-
- tower_address - -
- string -
-
- -
IP address or DNS name of Tower server. Must be accessible via this address from the VPC that this instance will be launched in.
-
-
- 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 communication with the AWS APIs.
-
-
- volumes - -
- list - / elements=dictionary -
-
- -
A list of block device mappings, by default this will always use the AMI root device so the volumes option is primarily for adding more storage.
-
A mapping contains the (optional) keys device_name, virtual_name, ebs.volume_type, ebs.volume_size, ebs.kms_key_id, ebs.iops, and ebs.delete_on_termination.
-
Set ebs.throughput value requires botocore>=1.19.27.
- -
-
- vpc_subnet_id - -
- string -
-
- -
The subnet ID in which to launch the instance (VPC) If none is provided, amazon.aws.ec2_instance will chose the default zone of the default VPC.
-

aliases: subnet_id
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether or not to wait for the desired state (use wait_timeout to customize this).
-
-
- wait_timeout - -
- integer -
-
- Default:
600
-
-
How long to wait (in seconds) for the instance to finish booting/terminating.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Terminate every running instance in a region. Use with EXTREME caution. - amazon.aws.ec2_instance: - state: absent - filters: - instance-state-name: running - - - name: restart a particular instance by its ID - amazon.aws.ec2_instance: - state: restarted - instance_ids: - - i-12345678 - - - name: start an instance with a public IP address - amazon.aws.ec2_instance: - name: "public-compute-instance" - key_name: "prod-ssh-key" - vpc_subnet_id: subnet-5ca1ab1e - instance_type: c5.large - security_group: default - network: - assign_public_ip: true - image_id: ami-123456 - tags: - Environment: Testing - - - name: start an instance and Add EBS - amazon.aws.ec2_instance: - name: "public-withebs-instance" - vpc_subnet_id: subnet-5ca1ab1e - instance_type: t2.micro - key_name: "prod-ssh-key" - security_group: default - volumes: - - device_name: /dev/sda1 - ebs: - volume_size: 16 - delete_on_termination: true - - - name: start an instance with a cpu_options - amazon.aws.ec2_instance: - name: "public-cpuoption-instance" - vpc_subnet_id: subnet-5ca1ab1e - tags: - Environment: Testing - instance_type: c4.large - volumes: - - device_name: /dev/sda1 - ebs: - delete_on_termination: true - cpu_options: - core_count: 1 - threads_per_core: 1 - - - name: start an instance and have it begin a Tower callback on boot - amazon.aws.ec2_instance: - name: "tower-callback-test" - key_name: "prod-ssh-key" - vpc_subnet_id: subnet-5ca1ab1e - security_group: default - tower_callback: - # IP or hostname of tower server - tower_address: 1.2.3.4 - job_template_id: 876 - host_config_key: '[secret config key goes here]' - network: - assign_public_ip: true - image_id: ami-123456 - cpu_credit_specification: unlimited - tags: - SomeThing: "A value" - - - name: start an instance with ENI (An existing ENI ID is required) - amazon.aws.ec2_instance: - name: "public-eni-instance" - key_name: "prod-ssh-key" - vpc_subnet_id: subnet-5ca1ab1e - network: - interfaces: - - id: "eni-12345" - tags: - Env: "eni_on" - volumes: - - device_name: /dev/sda1 - ebs: - delete_on_termination: true - instance_type: t2.micro - image_id: ami-123456 - - - name: add second ENI interface - amazon.aws.ec2_instance: - name: "public-eni-instance" - network: - interfaces: - - id: "eni-12345" - - id: "eni-67890" - image_id: ami-123456 - tags: - Env: "eni_on" - instance_type: t2.micro - - - name: start an instance with metadata options - amazon.aws.ec2_instance: - name: "public-metadataoptions-instance" - vpc_subnet_id: subnet-5calable - instance_type: t3.small - image_id: ami-123456 - tags: - Environment: Testing - metadata_options: - http_endpoint: enabled - http_tokens: optional - - # ensure number of instances running with a tag matches exact_count - - name: start multiple instances - amazon.aws.ec2_instance: - instance_type: t3.small - image_id: ami-123456 - exact_count: 5 - region: us-east-2 - vpc_subnet_id: subnet-0123456 - network: - assign_public_ip: yes - security_group: default - tags: - foo: bar - - # launches multiple instances - specific number of instances - - name: start specific number of multiple instances - amazon.aws.ec2_instance: - instance_type: t3.small - image_id: ami-123456 - count: 3 - region: us-east-2 - network: - assign_public_ip: yes - security_group: default - vpc_subnet_id: subnet-0123456 - state: present - tags: - foo: bar - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- instances - -
- complex -
-
when wait == true -
a list of ec2 instances
-
-
  -
- ami_launch_index - -
- integer -
-
always -
The AMI launch index, which can be used to find this instance in the launch group.
-
-
  -
- architecture - -
- string -
-
always -
The architecture of the image
-
-
Sample:
-
x86_64
-
  -
- block_device_mappings - -
- complex -
-
always -
Any block device mapping entries for the instance.
-
-
   -
- device_name - -
- string -
-
always -
The device name exposed to the instance (for example, /dev/sdh or xvdh).
-
-
Sample:
-
/dev/sdh
-
   -
- ebs - -
- complex -
-
always -
Parameters used to automatically set up EBS volumes when the instance is launched.
-
-
    -
- attach_time - -
- string -
-
always -
The time stamp when the attachment initiated.
-
-
Sample:
-
2017-03-23T22:51:24+00:00
-
    -
- delete_on_termination - -
- boolean -
-
always -
Indicates whether the volume is deleted on instance termination.
-
-
Sample:
-
True
-
    -
- status - -
- string -
-
always -
The attachment state.
-
-
Sample:
-
attached
-
    -
- volume_id - -
- string -
-
always -
The ID of the EBS volume
-
-
Sample:
-
vol-12345678
-
  -
- client_token - -
- string -
-
always -
The idempotency token you provided when you launched the instance, if applicable.
-
-
Sample:
-
mytoken
-
  -
- ebs_optimized - -
- boolean -
-
always -
Indicates whether the instance is optimized for EBS I/O.
-
-
  -
- hypervisor - -
- string -
-
always -
The hypervisor type of the instance.
-
-
Sample:
-
xen
-
  -
- iam_instance_profile - -
- complex -
-
always -
The IAM instance profile associated with the instance, if applicable.
-
-
   -
- arn - -
- string -
-
always -
The Amazon Resource Name (ARN) of the instance profile.
-
-
Sample:
-
arn:aws:iam::000012345678:instance-profile/myprofile
-
   -
- id - -
- string -
-
always -
The ID of the instance profile
-
-
Sample:
-
JFJ397FDG400FG9FD1N
-
  -
- image_id - -
- string -
-
always -
The ID of the AMI used to launch the instance.
-
-
Sample:
-
ami-0011223344
-
  -
- instance_id - -
- string -
-
always -
The ID of the instance.
-
-
Sample:
-
i-012345678
-
  -
- instance_type - -
- string -
-
always -
The instance type size of the running instance.
-
-
Sample:
-
t2.micro
-
  -
- key_name - -
- string -
-
always -
The name of the key pair, if this instance was launched with an associated key pair.
-
-
Sample:
-
my-key
-
  -
- launch_time - -
- string -
-
always -
The time the instance was launched.
-
-
Sample:
-
2017-03-23T22:51:24+00:00
-
  -
- monitoring - -
- complex -
-
always -
The monitoring for the instance.
-
-
   -
- state - -
- string -
-
always -
Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
-
-
Sample:
-
disabled
-
  -
- network.source_dest_check - -
- boolean -
-
always -
Indicates whether source/destination checking is enabled.
-
-
Sample:
-
True
-
  -
- network_interfaces - -
- complex -
-
always -
One or more network interfaces for the instance.
-
-
   -
- association - -
- complex -
-
always -
The association information for an Elastic IPv4 associated with the network interface.
-
-
    -
- ip_owner_id - -
- string -
-
always -
The ID of the owner of the Elastic IP address.
-
-
Sample:
-
amazon
-
    -
- public_dns_name - -
- string -
-
always -
The public DNS name.
-
-
    -
- public_ip - -
- string -
-
always -
The public IP address or Elastic IP address bound to the network interface.
-
-
Sample:
-
1.2.3.4
-
   -
- attachment - -
- complex -
-
always -
The network interface attachment.
-
-
    -
- attach_time - -
- string -
-
always -
The time stamp when the attachment initiated.
-
-
Sample:
-
2017-03-23T22:51:24+00:00
-
    -
- attachment_id - -
- string -
-
always -
The ID of the network interface attachment.
-
-
Sample:
-
eni-attach-3aff3f
-
    -
- delete_on_termination - -
- boolean -
-
always -
Indicates whether the network interface is deleted when the instance is terminated.
-
-
Sample:
-
True
-
    -
- device_index - -
- integer -
-
always -
The index of the device on the instance for the network interface attachment.
-
-
    -
- status - -
- string -
-
always -
The attachment state.
-
-
Sample:
-
attached
-
   -
- description - -
- string -
-
always -
The description.
-
-
Sample:
-
My interface
-
   -
- groups - -
- list - / elements=dictionary -
-
always -
One or more security groups.
-
-
    -
- group_id - -
- string -
-
always -
The ID of the security group.
-
-
Sample:
-
sg-abcdef12
-
    -
- group_name - -
- string -
-
always -
The name of the security group.
-
-
Sample:
-
mygroup
-
   -
- ipv6_addresses - -
- list - / elements=dictionary -
-
always -
One or more IPv6 addresses associated with the network interface.
-
-
    -
- ipv6_address - -
- string -
-
always -
The IPv6 address.
-
-
Sample:
-
2001:0db8:85a3:0000:0000:8a2e:0370:7334
-
   -
- mac_address - -
- string -
-
always -
The MAC address.
-
-
Sample:
-
00:11:22:33:44:55
-
   -
- network_interface_id - -
- string -
-
always -
The ID of the network interface.
-
-
Sample:
-
eni-01234567
-
   -
- owner_id - -
- string -
-
always -
The AWS account ID of the owner of the network interface.
-
-
Sample:
-
01234567890
-
   -
- private_ip_address - -
- string -
-
always -
The IPv4 address of the network interface within the subnet.
-
-
Sample:
-
10.0.0.1
-
   -
- private_ip_addresses - -
- list - / elements=dictionary -
-
always -
The private IPv4 addresses associated with the network interface.
-
-
    -
- association - -
- complex -
-
always -
The association information for an Elastic IP address (IPv4) associated with the network interface.
-
-
     -
- ip_owner_id - -
- string -
-
always -
The ID of the owner of the Elastic IP address.
-
-
Sample:
-
amazon
-
     -
- public_dns_name - -
- string -
-
always -
The public DNS name.
-
-
     -
- public_ip - -
- string -
-
always -
The public IP address or Elastic IP address bound to the network interface.
-
-
Sample:
-
1.2.3.4
-
    -
- primary - -
- boolean -
-
always -
Indicates whether this IPv4 address is the primary private IP address of the network interface.
-
-
Sample:
-
True
-
    -
- private_ip_address - -
- string -
-
always -
The private IPv4 address of the network interface.
-
-
Sample:
-
10.0.0.1
-
   -
- source_dest_check - -
- boolean -
-
always -
Indicates whether source/destination checking is enabled.
-
-
Sample:
-
True
-
   -
- status - -
- string -
-
always -
The status of the network interface.
-
-
Sample:
-
in-use
-
   -
- subnet_id - -
- string -
-
always -
The ID of the subnet for the network interface.
-
-
Sample:
-
subnet-0123456
-
   -
- vpc_id - -
- string -
-
always -
The ID of the VPC for the network interface.
-
-
Sample:
-
vpc-0123456
-
  -
- placement - -
- complex -
-
always -
The location where the instance launched, if applicable.
-
-
   -
- availability_zone - -
- string -
-
always -
The Availability Zone of the instance.
-
-
Sample:
-
ap-southeast-2a
-
   -
- group_name - -
- string -
-
always -
The name of the placement group the instance is in (for cluster compute instances).
-
-
   -
- tenancy - -
- string -
-
always -
The tenancy of the instance (if the instance is running in a VPC).
-
-
Sample:
-
default
-
  -
- private_dns_name - -
- string -
-
always -
The private DNS name.
-
-
Sample:
-
ip-10-0-0-1.ap-southeast-2.compute.internal
-
  -
- private_ip_address - -
- string -
-
always -
The IPv4 address of the network interface within the subnet.
-
-
Sample:
-
10.0.0.1
-
  -
- product_codes - -
- list - / elements=dictionary -
-
always -
One or more product codes.
-
-
   -
- product_code_id - -
- string -
-
always -
The product code.
-
-
Sample:
-
aw0evgkw8ef3n2498gndfgasdfsd5cce
-
   -
- product_code_type - -
- string -
-
always -
The type of product code.
-
-
Sample:
-
marketplace
-
  -
- public_dns_name - -
- string -
-
always -
The public DNS name assigned to the instance.
-
-
  -
- public_ip_address - -
- string -
-
always -
The public IPv4 address assigned to the instance
-
-
Sample:
-
52.0.0.1
-
  -
- 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
-
  -
- security_groups - -
- list - / elements=dictionary -
-
always -
One or more security groups for the instance.
-
-
   -
- group_id - -
- string -
-
always -
The ID of the security group.
-
-
Sample:
-
sg-0123456
-
   -
- group_name - -
- string -
-
always -
The name of the security group.
-
-
Sample:
-
my-security-group
-
  -
- state - -
- complex -
-
always -
The current state of the instance.
-
-
   -
- code - -
- integer -
-
always -
The low byte represents the state.
-
-
Sample:
-
16
-
   -
- name - -
- string -
-
always -
The name of the state.
-
-
Sample:
-
running
-
  -
- state_transition_reason - -
- string -
-
always -
The reason for the most recent state transition.
-
-
  -
- subnet_id - -
- string -
-
always -
The ID of the subnet in which the instance is running.
-
-
Sample:
-
subnet-00abcdef
-
  -
- tags - -
- dictionary -
-
always -
Any tags assigned to the instance.
-
-
  -
- virtualization_type - -
- string -
-
always -
The type of virtualization of the AMI.
-
-
Sample:
-
hvm
-
  -
- vpc_id - -
- dictionary -
-
always -
The ID of the VPC the instance is in.
-
-
Sample:
-
vpc-0011223344
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Ryan Scott Brown (@ryansb) diff --git a/docs/amazon.aws.ec2_key_module.rst b/docs/amazon.aws.ec2_key_module.rst deleted file mode 100644 index 72658bcf5e6..00000000000 --- a/docs/amazon.aws.ec2_key_module.rst +++ /dev/null @@ -1,622 +0,0 @@ -.. _amazon.aws.ec2_key_module: - - -****************** -amazon.aws.ec2_key -****************** - -**create or delete an ec2 key pair** - - -Version added: 1.0.0 - -.. 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. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- force - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Force overwrite of already existing key pair if key has changed.
-
-
- key_material - -
- string -
-
- -
Public key material.
-
-
- key_type - -
- string -
-
added in 3.1.0
-
-
    Choices: -
  • rsa
  • -
  • ed25519
  • -
-
-
The type of key pair to create.
-
Note that ED25519 keys are not supported for Windows instances, EC2 Instance Connect, and EC2 Serial Console.
-
By default Amazon will create an RSA key.
-
Mutually exclusive with parameter key_material.
-
Requires at least botocore version 1.21.23.
-
-
- name - -
- string - / required -
-
- -
Name of the key pair.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_tags - -
- boolean -
-
added in 2.1.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Delete any tags not specified in tags.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
create or delete keypair
-
-
- tags - -
- dictionary -
-
added in 2.1.0
-
- -
A dictionary of tags to set on the key pair.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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') }}" - - - name: Create ED25519 key pair - amazon.aws.ec2_key: - name: my_keypair - key_type: ed25519 - - # 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
-
  -
- id - -
- string -
-
when state is present -
id of the keypair
-
-
Sample:
-
key-123456789abc
-
  -
- 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-----
-
  -
- tags - -
- dictionary -
-
when state is present -
a dictionary representing the tags attached to the key pair
-
-
Sample:
-
{"my_key": "my value"}
-
  -
- type - -
- string -
-
added in 3.1.0
-
when a new keypair is created by AWS -
type of a newly created keypair
-
-
Sample:
-
rsa
-
-
- msg - -
- string -
-
always -
short message describing the action taken
-
-
Sample:
-
key pair created
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Vincent Viallet (@zbal) -- Prasad Katti (@prasadkatti) diff --git a/docs/amazon.aws.ec2_metadata_facts_module.rst b/docs/amazon.aws.ec2_metadata_facts_module.rst deleted file mode 100644 index 7d8f1a0eb94..00000000000 --- a/docs/amazon.aws.ec2_metadata_facts_module.rst +++ /dev/null @@ -1,1611 +0,0 @@ -.. _amazon.aws.ec2_metadata_facts_module: - - -***************************** -amazon.aws.ec2_metadata_facts -***************************** - -**gathers facts (instance metadata) about remote hosts within EC2** - - -Version added: 1.0.0 - -.. 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. -- The module is configured to utilize the session oriented Instance Metadata Service v2 (IMDSv2) https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html. -- If the HttpEndpoint parameter https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceMetadataOptions.html#API_ModifyInstanceMetadataOptions_RequestParameters is set to disabled for the EC2 instance, the module will return an error while retrieving a session token. - - - - - -Notes ------ - -.. note:: - - Parameters to filter on ec2_metadata_facts may be added later. - - - -Examples --------- - -.. code-block:: yaml - - # 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_role_name - -
- 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_role_name_accesskeyid - -
- string -
-
-
IAM role access key ID. -
-
-
-
- ansible_ec2_iam_security_credentials_role_name_code - -
- string -
-
-
IAM code. -
-
-
Sample:
-
Success
-
-
- ansible_ec2_iam_security_credentials_role_name_expiration - -
- string -
-
-
IAM role credentials expiration time. -
-
-
Sample:
-
2017-05-12T09:11:41Z
-
-
- ansible_ec2_iam_security_credentials_role_name_lastupdated - -
- string -
-
-
IAM role last updated time. -
-
-
Sample:
-
2017-05-12T02:40:44Z
-
-
- ansible_ec2_iam_security_credentials_role_name_secretaccesskey - -
- string -
-
-
IAM role secret access key. -
-
-
-
- ansible_ec2_iam_security_credentials_role_name_token - -
- string -
-
-
IAM role token. -
-
-
-
- ansible_ec2_iam_security_credentials_role_name_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_life_cycle - -
- string -
-
-
The purchasing option of the instance. -
-
-
Sample:
-
on-demand
-
-
- ansible_ec2_instance_type - -
- string -
-
-
The type of the 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; no longer available. -
-
-
-
- ansible_ec2_network_interfaces_macs_mac_address_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_mac_address_interface_id - -
- string -
-
-
The elastic network interface ID. -
-
-
Sample:
-
eni-12345678
-
-
- ansible_ec2_network_interfaces_macs_mac_address_ipv4_associations_ip_address - -
- string -
-
-
The private IPv4 addresses that are associated with each public-ip address and assigned to that interface. -
-
-
-
- ansible_ec2_network_interfaces_macs_mac_address_ipv6s - -
- string -
-
-
The IPv6 addresses associated with the interface. Returned only for instances launched into a VPC. -
-
-
-
- ansible_ec2_network_interfaces_macs_mac_address_local_hostname - -
- string -
-
-
The interface's local hostname. -
-
-
-
- ansible_ec2_network_interfaces_macs_mac_address_local_ipv4s - -
- string -
-
-
The private IPv4 addresses associated with the interface. -
-
-
-
- ansible_ec2_network_interfaces_macs_mac_address_mac - -
- string -
-
-
The instance's MAC address. -
-
-
Sample:
-
00:11:22:33:44:55
-
-
- ansible_ec2_network_interfaces_macs_mac_address_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_mac_address_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_mac_address_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_mac_address_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_mac_address_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_mac_address_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_mac_address_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_mac_address_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_mac_address_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_mac_address_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_mac_address_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_mac_address_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) diff --git a/docs/amazon.aws.ec2_module.rst b/docs/amazon.aws.ec2_module.rst deleted file mode 100644 index e2f947f168b..00000000000 --- a/docs/amazon.aws.ec2_module.rst +++ /dev/null @@ -1,2078 +0,0 @@ -.. _amazon.aws.ec2_module: - - -************** -amazon.aws.ec2 -************** - -**create, terminate, start or stop an instance in ec2** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - -DEPRECATED ----------- -:Removed in collection release after -:Why: The ec2 module is based upon a deprecated version of the AWS SDK. -:Alternative: Use :ref:`amazon.aws.ec2_instance `. - - - -Synopsis --------- -- Creates or terminates ec2 instances. -- Note: This module uses the older boto Python module to interact with the EC2 API. :ref:`amazon.aws.ec2 ` will still receive bug fixes, but no new features. Consider using the :ref:`amazon.aws.ec2_instance ` module instead. If :ref:`amazon.aws.ec2_instance ` does not support a feature you need that is available in :ref:`amazon.aws.ec2 `, please file a feature request. - - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- boto -- boto3 >= 1.16.0 -- botocore >= 1.19.0 -- python >= 2.6 -- python >= 3.6 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 instances to start/stop by tag. For example {"key":"value"} or {"key":"value","key2":"value2"}.
-
-
- 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 amazon.aws.ec2_key module.
-

aliases: keypair
-
-
- monitoring - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Enable detailed monitoring (CloudWatch) for the 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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.
-
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.
-
Defaults to false.
-
-
- 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 communication with the AWS APIs.
-
-
- 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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 - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- changed - -
- boolean -
-
always -
If the EC2 instance has changed.
-
-
Sample:
-
True
-
-
- instances - -
- list -
-
always -
The instances.
-
-
  -
- ami_launch_index - -
- integer -
-
always -
The AMI launch index, which can be used to find this instance in the launch group.
-
-
  -
- architecture - -
- string -
-
always -
The architecture of the image.
-
-
Sample:
-
x86_64
-
  -
- block_device_mapping - -
- dictionary -
-
always -
Any block device mapping entries for the instance.
-
-
Sample:
-
{'/dev/xvda': {'delete_on_termination': True, 'status': 'attached', 'volume_id': 'vol-06d364586f5550b62'}}
-
  -
- capacity_reservation_specification - -
- dictionary -
-
always -
Information about the Capacity Reservation targeting option.
-
-
Sample:
-
{'capacity_reservation_preference': 'open'}
-
  -
- client_token - -
- string -
-
always -
The idempotency token you provided when you launched the instance, if applicable.
-
-
  -
- cpu_options - -
- dictionary -
-
always -
The CPU options for the instance.
-
-
Sample:
-
{'core_count': 1, 'threads_per_core': 1}
-
  -
- dns_name - -
- string -
-
always -
The public DNS name assigned to the instance.
-
-
Sample:
-
ec2-203-0-113-1.z-2.compute-1.amazonaws.com
-
  -
- ebs_optimized - -
- boolean -
-
always -
Indicates whether the instance is optimized for Amazon EBS I/O.
-
-
  -
- ena_support - -
- boolean -
-
always -
Specifies whether enhanced networking with ENA is enabled.
-
-
Sample:
-
True
-
  -
- enclave_options - -
- dictionary -
-
always -
Indicates whether the instance is enabled for AWS Nitro Enclaves.
-
-
Sample:
-
{'enabled': False}
-
  -
- groups - -
- dictionary -
-
always -
One or more security groups.
-
-
Sample:
-
{'sg-0c6562ab3d435619f': 'ansible-test--88312190_setup'}
-
  -
- hibernation_options - -
- dictionary -
-
always -
Indicates whether the instance is enabled for hibernation.
-
-
Sample:
-
{'configured': False}
-
  -
- hypervisor - -
- string -
-
always -
The hypervisor type of the instance.
-
-
Sample:
-
xen
-
  -
- image_id - -
- string -
-
always -
The ID of the AMI used to launch the instance.
-
-
Sample:
-
ami-0d5eff06f840b45e9
-
  -
- instance_id - -
- string -
-
always -
The ID of the instance.
-
-
Sample:
-
i-0250719204c428be1
-
  -
- instance_type - -
- string -
-
always -
The instance type.
-
-
Sample:
-
t2.micro
-
  -
- kernel - -
- string -
-
always -
The kernel associated with this instance, if applicable.
-
-
  -
- key_name - -
- string -
-
always -
The name of the key pair, if this instance was launched with an associated key pair.
-
-
Sample:
-
ansible-test-88312190_setup
-
  -
- launch_time - -
- string -
-
always -
The time the instance was launched.
-
-
Sample:
-
2021-05-09T19:30:26.000Z
-
  -
- metadata - -
- dictionary -
-
always -
The metadata options for the instance.
-
-
Sample:
-
{'http_endpoint': 'enabled', 'http_put_response_hop_limit': 1, 'http_tokens': 'optional', 'state': 'applied'}
-
  -
- monitoring - -
- dictionary -
-
always -
The monitoring for the instance.
-
-
Sample:
-
{'state': 'disabled'}
-
  -
- network_interfaces - -
- list -
-
always -
The network interfaces for the instance.
-
-
Sample:
-
[{'attachment': {'attach_time': '2021-05-09T19:30:57+00:00', 'attachment_id': 'eni-attach-07341f2560be6c8fc', 'delete_on_termination': True, 'device_index': 0, 'network_card_index': 0, 'status': 'attached'}, 'description': '', 'groups': [{'group_id': 'sg-0c6562ab3d435619f', 'group_name': 'ansible-test-88312190_setup'}], 'interface_type': 'interface', 'ipv6_addresses': [], 'mac_address': '0e:0e:36:60:67:cf', 'network_interface_id': 'eni-061dee20eba3b445a', 'owner_id': '721066863947', 'private_dns_name': 'ip-10-176-1-178.ec2.internal', 'private_ip_address': '10.176.1.178', 'private_ip_addresses': [{'primary': True, 'private_dns_name': 'ip-10-176-1-178.ec2.internal', 'private_ip_address': '10.176.1.178'}], 'source_dest_check': True, 'status': 'in-use', 'subnet_id': 'subnet-069d3e2eab081955d', 'vpc_id': 'vpc-0b6879b6ca2e9be2b'}]
-
  -
- placement - -
- dictionary -
-
always -
The location where the instance launched, if applicable.
-
-
Sample:
-
{'availability_zone': 'us-east-1a', 'group_name': '', 'tenancy': 'default'}
-
  -
- private_dns_name - -
- string -
-
always -
The private DNS hostname name assigned to the instance.
-
-
Sample:
-
ip-10-176-1-249.ec2.internal
-
  -
- private_ip - -
- string -
-
always -
The private IPv4 address assigned to the instance.
-
-
Sample:
-
10.176.1.249
-
  -
- public_dns_name - -
- string -
-
always -
The public DNS name assigned to the instance.
-
-
Sample:
-
ec2-203-0-113-1.z-2.compute-1.amazonaws.com
-
  -
- public_ip - -
- string -
-
always -
The public IPv4 address, or the Carrier IP address assigned to the instance, if applicable.
-
-
Sample:
-
203.0.113.1
-
  -
- ramdisk - -
- string -
-
always -
The RAM disk associated with this instance, if applicable.
-
-
  -
- root_device_name - -
- string -
-
always -
The device name of the root device volume.
-
-
Sample:
-
/dev/xvda
-
  -
- root_device_type - -
- string -
-
always -
The root device type used by the AMI.
-
-
Sample:
-
ebs
-
  -
- security_groups - -
- list -
-
always -
The security groups for the instance.
-
-
Sample:
-
[{'group_id': 'sg-0c6562ab3d435619f', 'group_name': 'ansible-test-alinas-mbp-88312190_setup'}]
-
  -
- source_dest_check - -
- boolean -
-
always -
Indicates whether source/destination checking is enabled.
-
-
Sample:
-
True
-
  -
- state - -
- dictionary -
-
always -
The current state of the instance.
-
-
Sample:
-
{'code': 80, 'name': 'stopped'}
-
  -
- state_reason - -
- dictionary -
-
always -
The reason for the most recent state transition.
-
-
Sample:
-
{'code': 'Client.UserInitiatedShutdown', 'message': 'Client.UserInitiatedShutdown: User initiated shutdown'}
-
  -
- state_transition_reason - -
- string -
-
always -
The reason for the most recent state transition. This might be an empty string.
-
-
Sample:
-
User initiated (2021-05-09 19:31:28 GMT)
-
  -
- subnet_id - -
- string -
-
always -
The ID of the subnet in which the instance is running.
-
-
Sample:
-
subnet-069d3e2eab081955d
-
  -
- tags - -
- dictionary -
-
always -
Any tags assigned to the instance.
-
-
Sample:
-
{'ResourcePrefix': 'ansible-test-88312190-integration_tests'}
-
  -
- tenancy - -
- string -
-
always -
The tenancy of the instance (if the instance is running in a VPC).
-
-
Sample:
-
default
-
  -
- virtualization_type - -
- string -
-
always -
The virtualization type of the instance.
-
-
Sample:
-
hvm
-
  -
- vpc_id - -
- string -
-
always -
The ID of the VPC in which the instance is running.
-
-
Sample:
-
vpc-0b6879b6ca2e9be2b
-
-

- - -Status ------- - - -- This module will be removed in version 4.0.0. *[deprecated]* -- For more information see `DEPRECATED`_. - - -Authors -~~~~~~~ - -- Tim Gerla (@tgerla) -- Lester Wade (@lwade) -- Seth Vidal (@skvidal) diff --git a/docs/amazon.aws.ec2_snapshot_info_module.rst b/docs/amazon.aws.ec2_snapshot_info_module.rst deleted file mode 100644 index ce8fe865741..00000000000 --- a/docs/amazon.aws.ec2_snapshot_info_module.rst +++ /dev/null @@ -1,689 +0,0 @@ -.. _amazon.aws.ec2_snapshot_info_module: - - -**************************** -amazon.aws.ec2_snapshot_info -**************************** - -**Gathers information about EC2 volume snapshots in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gathers information about EC2 volume snapshots in AWS. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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.
-
-
- max_results - -
- integer -
-
- -
The maximum number of snapshot results returned in paginated output.
-
When used only a single page along with a next_token_id response element will be returned.
-
The remaining results of the initial request can be seen by sending another request with the returned next_token_id value.
-
This value can be between 5 and 1000; if next_token_id is given a value larger than 1000, only 1000 results are returned.
-
If this parameter is not used, then DescribeSnapshots returns all results.
-
This parameter is mutually exclusive with snapshot_ids.
-
-
- next_token_id - -
- string -
-
- -
Contains the value returned from a previous paginated request where max_results was used and the results exceeded the value of that parameter.
-
Pagination continues from the end of the previous results that returned the next_token_id value.
-
This parameter is mutually exclusive with snapshot_ids
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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 communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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
-
- next_token_id - -
- string -
-
when option max_results is set in input -
Contains the value returned from a previous paginated request where max_results was used and the results exceeded the value of that parameter.
-
This value is null when there are no more results to return.
-
-
-
- snapshots - -
- list - / elements=dictionary -
-
success -
snapshots retrieved
-
-
  -
- 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) -- Aubin Bikouo (@abikouo) diff --git a/docs/amazon.aws.ec2_snapshot_module.rst b/docs/amazon.aws.ec2_snapshot_module.rst deleted file mode 100644 index 28f74ba7862..00000000000 --- a/docs/amazon.aws.ec2_snapshot_module.rst +++ /dev/null @@ -1,523 +0,0 @@ -.. _amazon.aws.ec2_snapshot_module: - - -*********************** -amazon.aws.ec2_snapshot -*********************** - -**Creates a snapshot from an existing volume** - - -Version added: 1.0.0 - -.. 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 >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- snapshot_id - -
- string -
-
- -
Snapshot id to remove.
-
-
- snapshot_tags - -
- dictionary -
-
- -
A dictionary of tags to add to the snapshot.
-
If the volume has a Name tag this will be automatically added 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 communication with the AWS APIs.
-
-
- 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:
600
-
-
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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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) diff --git a/docs/amazon.aws.ec2_spot_instance_info_module.rst b/docs/amazon.aws.ec2_spot_instance_info_module.rst deleted file mode 100644 index 7691a5de8c7..00000000000 --- a/docs/amazon.aws.ec2_spot_instance_info_module.rst +++ /dev/null @@ -1,338 +0,0 @@ -.. _amazon.aws.ec2_spot_instance_info_module: - - -********************************* -amazon.aws.ec2_spot_instance_info -********************************* - -**Gather information about ec2 spot instance requests** - - -Version added: 2.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Describes the specified Spot Instance requests. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- filters - -
- dictionary -
-
- Default:
{}
-
-
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.
- -
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- spot_instance_request_ids - -
- list - / elements=string -
-
- -
One or more Spot Instance request IDs.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: describe the Spot Instance requests based on request IDs - amazon.aws.ec2_spot_instance_info: - spot_instance_request_ids: - - sir-12345678 - - - name: describe the Spot Instance requests and filter results based on instance type - amazon.aws.ec2_spot_instance_info: - spot_instance_request_ids: - - sir-12345678 - - sir-13579246 - - sir-87654321 - filters: - launch.instance-type: t3.medium - - - name: describe the Spot requests filtered using multiple filters - amazon.aws.ec2_spot_instance_info: - filters: - state: active - launch.block-device-mapping.device-name: /dev/sdb - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- spot_request - -
- dictionary -
-
when success -
The gathered information about specified spot instance requests.
-
-
Sample:
-
{'create_time': '2021-09-01T21:05:57+00:00', 'instance_id': 'i-08877936b801ac475', 'instance_interruption_behavior': 'terminate', 'launch_specification': {'ebs_optimized': False, 'image_id': 'ami-0443305dabd4be2bc', 'instance_type': 't2.medium', 'key_name': 'zuul', 'monitoring': {'enabled': False}, 'placement': {'availability_zone': 'us-east-2b'}, 'security_groups': [{'group_id': 'sg-01f9833207d53b937', 'group_name': 'default'}], 'subnet_id': 'subnet-07d906b8358869bda'}, 'launched_availability_zone': 'us-east-2b', 'product_description': 'Linux/UNIX', 'spot_instance_request_id': 'sir-c3cp9jsk', 'spot_price': '0.046400', 'state': 'active', 'status': {'code': 'fulfilled', 'message': 'Your spot request is fulfilled.', 'update_time': '2021-09-01T21:05:59+00:00'}, 'tags': {}, 'type': 'one-time', 'valid_until': '2021-09-08T21:05:57+00:00'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Mandar Vijay Kulkarni (@mandar242) diff --git a/docs/amazon.aws.ec2_spot_instance_module.rst b/docs/amazon.aws.ec2_spot_instance_module.rst deleted file mode 100644 index 7ef4904ba3e..00000000000 --- a/docs/amazon.aws.ec2_spot_instance_module.rst +++ /dev/null @@ -1,1332 +0,0 @@ -.. _amazon.aws.ec2_spot_instance_module: - - -**************************** -amazon.aws.ec2_spot_instance -**************************** - -**request, stop, reboot or cancel spot instance** - - -Version added: 2.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates or cancels spot instance requests. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_secret_key, secret_key
-
-
- client_token - -
- string -
-
- -
The idempotency token you provided when you launched the instance, if applicable.
-
-
- count - -
- integer -
-
- Default:
1
-
-
Number of instances to launch.
-
-
- 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- interruption - -
- string -
-
-
    Choices: -
  • hibernate
  • -
  • stop
  • -
  • terminate ←
  • -
-
-
The behavior when a Spot Instance is interrupted.
-
-
- launch_group - -
- string -
-
- - -
-
- launch_specification - -
- dictionary -
-
- -
The launch specification.
-
-
- block_device_mappings - -
- list - / elements=dictionary -
-
- -
A list of hash/dictionaries of volumes to add to the new instance.
-
-
- device_name - -
- string -
-
- -
The device name (for example, /dev/sdh or xvdh ).
-
-
- ebs - -
- dictionary -
-
- -
Parameters used to automatically set up EBS volumes when the instance is launched, see https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2.html#EC2.Client.request_spot_instances
-
-
- no_device - -
- string -
-
- -
To omit the device from the block device mapping, specify an empty string.
-
-
- virtual_name - -
- string -
-
- -
The virtual device name
-
-
- ebs_optimized - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether instance is using optimized EBS volumes, see https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html.
-
-
- iam_instance_profile - -
- dictionary -
-
- -
The IAM instance profile.
-
-
- arn - -
- string -
-
- -
The Amazon Resource Name (ARN) of the instance profile.
-
Only one of arn or name may be specified.
-
-
- name - -
- string -
-
- -
The name of the instance profile.
-
Only one of arn or name may be specified.
-
-
- image_id - -
- string -
-
- -
The ID of the AMI.
-
-
- instance_type - -
- string -
-
- - -
Required when creating a new instance.
-
-
- kernel_id - -
- string -
-
- -
The ID of the kernel.
-
-
- key_name - -
- string -
-
- -
Key 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 amazon.aws.ec2_key module.
-
-
- monitoring - -
- dictionary -
-
- -
Indicates whether basic or detailed monitoring is enabled for the instance.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Indicates whether detailed monitoring is enabled. Otherwise, basic monitoring is enabled.
-
-
- network_interfaces - -
- list - / elements=dictionary -
-
- -
One or more network interfaces. If you specify a network interface, you must specify subnet IDs and security group IDs using the network interface.
-
-
- associate_carrier_ip_address - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether to assign a carrier IP address to the network interface.
-
-
- associate_public_ip_address - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Indicates whether to assign a public IPv4 address to an instance you launch in a VPC.
-
-
- delete_on_termination - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
If set to true , the interface is deleted when the instance is terminated. You can specify true only if creating a new network interface when launching an instance.
-
-
- description - -
- string -
-
- -
The description of the network interface. Applies only if creating a network interface when launching an instance.
-
-
- device_index - -
- integer -
-
- -
The position of the network interface in the attachment order. A primary network interface has a device index of 0.
-
If you specify a network interface when launching an instance, you must specify the device index.
-
-
- groups - -
- list - / elements=string -
-
- -
The IDs of the security groups for the network interface. Applies only if creating a network interface when launching an instance.
-
-
- interface_type - -
- string -
-
-
    Choices: -
  • interface
  • -
  • efa
  • -
-
-
The type of network interface.
-
-
- ipv4_prefix_count - -
- integer -
-
- -
The number of IPv4 delegated prefixes to be automatically assigned to the network interface
-
-
- ipv4_prefixes - -
- list - / elements=dictionary -
-
- -
One or more IPv4 delegated prefixes to be assigned to the network interface.
-
-
- ipv6_address_count - -
- integer -
-
- -
A number of IPv6 addresses to assign to the network interface
-
-
- ipv6_addresses - -
- list - / elements=dictionary -
-
- -
One or more IPv6 addresses to assign to the network interface.
-
-
- ipv6address - -
- string -
-
- -
The IPv6 address.
-
-
- ipv6_prefix_count - -
- integer -
-
- -
The number of IPv6 delegated prefixes to be automatically assigned to the network interface
-
-
- ipv6_prefixes - -
- list - / elements=dictionary -
-
- -
One or more IPv6 delegated prefixes to be assigned to the network interface
-
-
- network_card_index - -
- integer -
-
- -
The index of the network card.
-
-
- network_interface_id - -
- string -
-
- -
The ID of the network interface.
-
-
- private_ip_address - -
- string -
-
- -
The private IPv4 address of the network interface
-
-
- private_ip_addresses - -
- list - / elements=dictionary -
-
- -
One or more private IPv4 addresses to assign to the network interface
-
-
- secondary_private_ip_address_count - -
- integer -
-
- -
The number of secondary private IPv4 addresses.
-
-
- subnet_id - -
- string -
-
- -
The ID of the subnet associated with the network interface
-
-
- placement - -
- dictionary -
-
- -
The placement information for the instance.
-
-
- availability_zone - -
- string -
-
- -
The Availability Zone.
-
-
- group_name - -
- string -
-
- -
The name of the placement group.
-
-
- tenancy - -
- string -
-
-
    Choices: -
  • default ←
  • -
  • dedicated
  • -
  • host
  • -
-
-
the tenancy of the host
-
-
- ramdisk_id - -
- string -
-
- -
The ID of the RAM disk.
-
-
- security_group_ids - -
- list - / elements=string -
-
- -
Security group id (or list of ids) to use with the instance.
-
-
- security_groups - -
- list - / elements=string -
-
- -
Security group name (or list of group names) to use with the instance.
-
Only supported with EC2 Classic. To launch in a VPC, use group_id
-
-
- subnet_id - -
- string -
-
- -
The ID of the subnet in which to launch the instance.
-
-
- user_data - -
- string -
-
- -
The base64-encoded user data for the instance. User data is limited to 16 KB.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- spot_instance_request_ids - -
- list - / elements=string -
-
- Default:
[]
-
-
List of strings with IDs of spot requests to be cancelled
-
-
- 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.
-
-
- state - -
- string -
-
-
    Choices: -
  • absent
  • -
  • present ←
  • -
-
-
Whether the spot request should be created or removed.
-
When state=present, launch_specification is required.
-
When state=absent, spot_instance_request_ids is required.
-
-
- tags - -
- dictionary -
-
- -
A dictionary of key-value pairs for tagging the Spot Instance request on creation.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- zone_group - -
- string -
-
- -
Name for logical grouping of spot requests.
-
All spot instances in the request are launched in the same availability 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Simple Spot Request Creation - amazon.aws.ec2_spot_instance: - launch_specification: - image_id: ami-123456789 - key_name: my-keypair - instance_type: t2.medium - - - name: Spot Request Creation with more options - amazon.aws.ec2_spot_instance: - launch_specification: - image_id: ami-123456789 - key_name: my-keypair - instance_type: t2.medium - subnet_id: subnet-12345678 - block_device_mappings: - - device_name: /dev/sdb - ebs: - delete_on_termination: True - volume_type: gp3 - volume_size: 5 - - device_name: /dev/sdc - ebs: - delete_on_termination: True - volume_type: io2 - volume_size: 30 - network_interfaces: - - associate_public_ip_address: False - delete_on_termination: True - device_index: 0 - placement: - availability_zone: us-west-2a - monitoring: - enabled: False - spot_price: 0.002 - tags: - Environment: Testing - - - name: Spot Request Termination - amazon.aws.ec2_spot_instance: - spot_instance_request_ids: ['sir-12345678', 'sir-abcdefgh'] - state: absent - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- cancelled_spot_request - -
- string -
-
always -
The spot instance request details that has been cancelled
-
-
Sample:
-
Spot requests with IDs: sir-1234abcd have been cancelled
-
-
- spot_request - -
- dictionary -
-
when success -
The spot instance request details after creation
-
-
Sample:
-
{'create_time': '2021-08-23T22:59:12+00:00', 'instance_interruption_behavior': 'terminate', 'launch_specification': {'block_device_mappings': [{'device_name': '/dev/sdb', 'ebs': {'delete_on_termination': True, 'volume_size': 5, 'volume_type': 'gp3'}}], 'ebs_optimized': False, 'iam_instance_profile': {'arn': 'arn:aws:iam::EXAMPLE:instance-profile/myinstanceprofile'}, 'image_id': 'ami-083ac7c7ecf9bb9b0', 'instance_type': 't2.small', 'key_name': 'mykey', 'monitoring': {'enabled': False}, 'network_interfaces': [{'associate_public_ip_address': False, 'delete_on_termination': True, 'device_index': 0}], 'placement': {'availability_zone': 'us-west-2a', 'tenancy': 'default'}, 'security_groups': [{'group_name': 'default'}]}, 'product_description': 'Linux/UNIX', 'spot_instance_request_id': 'sir-1234abcd', 'spot_price': '0.00600', 'state': 'open', 'status': {'code': 'pending-evaluation', 'message': 'Your Spot request has been submitted for review, and is pending evaluation.', 'update_time': '2021-08-23T22:59:12+00:00'}, 'type': 'one-time'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Sri Rachana Achyuthuni (@srirachanaachyuthuni) diff --git a/docs/amazon.aws.ec2_tag_info_module.rst b/docs/amazon.aws.ec2_tag_info_module.rst deleted file mode 100644 index 9f375fb4cdb..00000000000 --- a/docs/amazon.aws.ec2_tag_info_module.rst +++ /dev/null @@ -1,310 +0,0 @@ -.. _amazon.aws.ec2_tag_info_module: - - -*********************** -amazon.aws.ec2_tag_info -*********************** - -**list tags on ec2 resources** - - -Version added: 1.0.0 - -.. 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:`amazon.aws.ec2_tag ` module. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - - 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) diff --git a/docs/amazon.aws.ec2_tag_module.rst b/docs/amazon.aws.ec2_tag_module.rst deleted file mode 100644 index ea85c2fa632..00000000000 --- a/docs/amazon.aws.ec2_tag_module.rst +++ /dev/null @@ -1,431 +0,0 @@ -.. _amazon.aws.ec2_tag_module: - - -****************** -amazon.aws.ec2_tag -****************** - -**create and remove tags on ec2 resources** - - -Version added: 1.0.0 - -.. 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. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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 amazon.aws.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 communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - - 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) diff --git a/docs/amazon.aws.ec2_vol_info_module.rst b/docs/amazon.aws.ec2_vol_info_module.rst deleted file mode 100644 index 5dfcf21f8a0..00000000000 --- a/docs/amazon.aws.ec2_vol_info_module.rst +++ /dev/null @@ -1,539 +0,0 @@ -.. _amazon.aws.ec2_vol_info_module: - - -*********************** -amazon.aws.ec2_vol_info -*********************** - -**Gather information about ec2 volumes in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 volumes in AWS. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- filters - -
- dictionary -
-
- -
A dict of filters to apply. Each dict item consists of a filter key and a filter value.
- -
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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 - - # Gather information about all volumes related to an EC2 Instance - # register information to `volumes` variable - # Replaces functionality of `amazon.aws.ec2_vol` - `state: list` - - name: get volume(s) info from EC2 Instance - amazon.aws.ec2_vol_info: - filters: - attachment.instance-id: "i-000111222333" - register: volumes - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- volumes - -
- list - / elements=dictionary -
-
always -
Volumes that match the provided filters. Each element consists of a dict with all the information related to that volume.
-
-
  -
- attachment_set - -
- list - / elements=dictionary -
-
-
Information about the volume attachments.
-
This was changed in version 2.0.0 from a dictionary to a list of dictionaries.
-
-
Sample:
-
[{'attach_time': '2015-10-23T00:22:29.000Z', 'deleteOnTermination': 'false', 'device': '/dev/sdf', 'instance_id': 'i-8356263c', 'status': 'attached'}]
-
  -
- create_time - -
- string -
-
-
The time stamp when volume creation was initiated.
-
-
Sample:
-
2015-10-21T14:36:08.870Z
-
  -
- encrypted - -
- boolean -
-
-
Indicates whether the volume is encrypted.
-
-
  -
- id - -
- string -
-
-
The ID of the volume.
-
-
Sample:
-
vol-35b333d9
-
  -
- iops - -
- integer -
-
-
The number of I/O operations per second (IOPS) that the volume supports.
-
-
  -
- size - -
- integer -
-
-
The size of the volume, in GiBs.
-
-
Sample:
-
1
-
  -
- snapshot_id - -
- string -
-
-
The snapshot from which the volume was created, if applicable.
-
-
  -
- status - -
- string -
-
-
The volume state.
-
-
Sample:
-
in-use
-
  -
- tags - -
- dictionary -
-
-
Any tags assigned to the volume.
-
-
Sample:
-
{'env': 'dev'}
-
  -
- throughput - -
- integer -
-
-
The throughput that the volume supports, in MiB/s.
-
-
Sample:
-
131
-
  -
- type - -
- string -
-
-
The volume type. This can be gp2, io1, st1, sc1, or standard.
-
-
Sample:
-
standard
-
  -
- zone - -
- string -
-
-
The Availability Zone of the volume.
-
-
Sample:
-
us-east-1b
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) diff --git a/docs/amazon.aws.ec2_vol_module.rst b/docs/amazon.aws.ec2_vol_module.rst deleted file mode 100644 index e6e863c651c..00000000000 --- a/docs/amazon.aws.ec2_vol_module.rst +++ /dev/null @@ -1,759 +0,0 @@ -.. _amazon.aws.ec2_vol_module: - - -****************** -amazon.aws.ec2_vol -****************** - -**Create and attach a volume, return volume id and device map** - - -Version added: 1.0.0 - -.. 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. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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).
-
-
- kms_key_id - -
- string -
-
- -
Specify the id of the KMS key to use.
-
-
- modify_volume - -
- boolean -
-
added in 1.4.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
The volume won't be modified unless this key is true.
-
-
- multi_attach - -
- boolean -
-
added in 2.0.0
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
If set to yes, Multi-Attach will be enabled when creating the volume.
-
When you create a new volume, Multi-Attach is disabled by default.
-
This parameter is supported with io1 and io2 volumes only.
-
-
- name - -
- string -
-
- -
Volume Name tag if you wish to attach an existing volume (requires instance)
-
-
- outpost_arn - -
- string -
-
added in 3.1.0
-
- -
The Amazon Resource Name (ARN) of the Outpost.
-
If set, allows to create volume in an Outpost.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_tags - -
- boolean -
-
added in 1.5.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Whether to remove existing tags that aren't passed 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
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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.
-
The use of state=list to interrogate the volume has been deprecated and will be removed after 2022-06-01. The 'list' functionality has been moved to a dedicated module amazon.aws.ec2_vol_info.
-
-
- tags - -
- dictionary -
-
- Default:
{}
-
-
tag:value pairs to add to the volume after creation.
-
-
- throughput - -
- integer -
-
added in 1.4.0
-
- -
Volume throughput in MB/s.
-
This parameter is only valid for gp3 volumes.
-
Valid range is from 125 to 1000.
-
Requires at least botocore version 1.19.27.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- volume_size - -
- integer -
-
- -
Size of volume (in GiB) to create.
-
-
- volume_type - -
- string -
-
-
    Choices: -
  • standard ←
  • -
  • gp2
  • -
  • io1
  • -
  • st1
  • -
  • sc1
  • -
  • gp3
  • -
  • io2
  • -
-
-
Type of EBS volume; standard (magnetic), gp2 (SSD), gp3 (SSD), io1 (Provisioned IOPS), io2 (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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Simple attachment action - - amazon.aws.ec2_vol: - instance: XXXXXX - volume_size: 5 - device_name: sdd - region: us-west-2 - - # Example using custom iops params - - amazon.aws.ec2_vol: - instance: XXXXXX - volume_size: 5 - iops: 100 - device_name: sdd - region: us-west-2 - - # 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. - - - 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 - region: us-west-2 - - # List volumes for an instance - - amazon.aws.ec2_vol: - instance: i-XXXXXX - state: list - region: us-west-2 - - # Create new volume using SSD storage - - amazon.aws.ec2_vol: - instance: XXXXXX - volume_size: 50 - volume_type: gp2 - device_name: /dev/xvdf - - # Create new volume with multi-attach enabled - - amazon.aws.ec2_vol: - zone: XXXXXX - multi_attach: true - volume_size: 4 - volume_type: io1 - iops: 102 - - # 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) diff --git a/docs/amazon.aws.ec2_vpc_dhcp_option_info_module.rst b/docs/amazon.aws.ec2_vpc_dhcp_option_info_module.rst deleted file mode 100644 index e7aeea5d4d9..00000000000 --- a/docs/amazon.aws.ec2_vpc_dhcp_option_info_module.rst +++ /dev/null @@ -1,550 +0,0 @@ -.. _amazon.aws.ec2_vpc_dhcp_option_info_module: - - -*********************************** -amazon.aws.ec2_vpc_dhcp_option_info -*********************************** - -**Gather information about dhcp options sets in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about dhcp options sets in AWS. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # # 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_config - -
- list -
-
always -
The boto2-style DHCP options created, associated or found. Provided for consistency with ec2_vpc_dhcp_option's dhcp_config.
-
-
  -
- domain-name - -
- list -
-
when available -
The domain name for hosts in the DHCP option sets
-
-
Sample:
-
['my.example.com']
-
  -
- domain-name-servers - -
- list -
-
when available -
The IP addresses of up to four domain name servers, or AmazonProvidedDNS.
-
-
Sample:
-
['10.0.0.1', '10.0.1.1']
-
  -
- netbios-name-servers - -
- list -
-
when available -
The IP addresses of up to four NetBIOS name servers.
-
-
Sample:
-
['10.0.0.1', '10.0.1.1']
-
  -
- netbios-node-type - -
- string -
-
when available -
The NetBIOS node type (1, 2, 4, or 8).
-
-
Sample:
-
2
-
  -
- ntp-servers - -
- list -
-
when available -
The IP addresses of up to four Network Time Protocol (NTP) servers.
-
-
Sample:
-
['10.0.0.1', '10.0.1.1']
-
-
- dhcp_options - -
- list - / elements=dictionary -
-
always -
The DHCP options created, associated or found
-
-
  -
- dhcp_configurations - -
- list -
-
-
The DHCP configuration for the option set
-
-
Sample:
-
['{"key": "ntp-servers", "values": [{"value": "10.0.0.2" , "value": "10.0.1.2"}]}', '{"key": "netbios-name-servers", "values": [{value": "10.0.0.1"}, {"value": "10.0.1.1" }]}']
-
  -
- dhcp_options_id - -
- string -
-
-
The aws resource id of the primary DCHP options set created or found
-
-
Sample:
-
dopt-0955331de6a20dd07
-
  -
- owner_id - -
- string -
-
-
The ID of the AWS account that owns the DHCP options set.
-
-
Sample:
-
012345678912
-
  -
- tags - -
- list -
-
-
The tags to be applied to a DHCP options set
-
-
Sample:
-
['{"Key": "CreatedBy", "Value": "ansible-test"}', '{"Key": "Collection", "Value": "amazon.aws"}']
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Nick Aslanidis (@naslanidis) diff --git a/docs/amazon.aws.ec2_vpc_dhcp_option_module.rst b/docs/amazon.aws.ec2_vpc_dhcp_option_module.rst deleted file mode 100644 index 0ee80f8ed9d..00000000000 --- a/docs/amazon.aws.ec2_vpc_dhcp_option_module.rst +++ /dev/null @@ -1,750 +0,0 @@ -.. _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** - - -Version added: 1.0.0 - -.. 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. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_tags - -
- boolean -
-
added in 2.0.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Remove tags not listed in tags.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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 communication with the AWS APIs.
-
-
- 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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_config - -
- dictionary -
-
when available -
The boto2-style DHCP options created, associated or found
-
-
  -
- domain-name - -
- list -
-
when available -
The domain name for hosts in the DHCP option sets
-
-
Sample:
-
['my.example.com']
-
  -
- domain-name-servers - -
- list -
-
when available -
The IP addresses of up to four domain name servers, or AmazonProvidedDNS.
-
-
Sample:
-
['10.0.0.1', '10.0.1.1']
-
  -
- netbios-name-servers - -
- list -
-
when available -
The IP addresses of up to four NetBIOS name servers.
-
-
Sample:
-
['10.0.0.1', '10.0.1.1']
-
  -
- netbios-node-type - -
- string -
-
when available -
The NetBIOS node type (1, 2, 4, or 8).
-
-
Sample:
-
2
-
  -
- ntp-servers - -
- list -
-
when available -
The IP addresses of up to four Network Time Protocol (NTP) servers.
-
-
Sample:
-
['10.0.0.1', '10.0.1.1']
-
-
- dhcp_options - -
- dictionary -
-
when available -
The DHCP options created, associated or found
-
-
  -
- dhcp_configurations - -
- list -
-
-
The DHCP configuration for the option set
-
-
Sample:
-
['{"key": "ntp-servers", "values": [{"value": "10.0.0.2" , "value": "10.0.1.2"}]}', '{"key": "netbios-name-servers", "values": [{value": "10.0.0.1"}, {"value": "10.0.1.1" }]}']
-
  -
- dhcp_options_id - -
- string -
-
-
The aws resource id of the primary DCHP options set created or found
-
-
Sample:
-
dopt-0955331de6a20dd07
-
  -
- owner_id - -
- string -
-
-
The ID of the AWS account that owns the DHCP options set.
-
-
Sample:
-
012345678912
-
  -
- tags - -
- list -
-
-
The tags to be applied to a DHCP options set
-
-
Sample:
-
['{"Key": "CreatedBy", "Value": "ansible-test"}', '{"Key": "Collection", "Value": "amazon.aws"}']
-
-
- dhcp_options_id - -
- string -
-
when available -
The aws resource id of the primary DCHP options set created, found or removed
-
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Joel Thompson (@joelthompson) diff --git a/docs/amazon.aws.ec2_vpc_endpoint_info_module.rst b/docs/amazon.aws.ec2_vpc_endpoint_info_module.rst deleted file mode 100644 index 415fe620c51..00000000000 --- a/docs/amazon.aws.ec2_vpc_endpoint_info_module.rst +++ /dev/null @@ -1,387 +0,0 @@ -.. _amazon.aws.ec2_vpc_endpoint_info_module: - - -******************************** -amazon.aws.ec2_vpc_endpoint_info -******************************** - -**Retrieves AWS VPC endpoints details using AWS methods.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gets various details related to AWS VPC endpoints. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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_DescribeVpcEndpoints.html for possible filters.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- query - -
- string -
-
-
    Choices: -
  • services
  • -
  • endpoints
  • -
-
-
Defaults to endpoints.
-
Specifies the query action to take.
-
query=endpoints returns information about AWS VPC endpoints.
-
Retrieving information about services using query=services has been deprecated in favour of the amazon.aws.ec2_vpc_endpoint_service_info module.
-
The query option has been deprecated and will be removed after 2022-12-01.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- vpc_endpoint_ids - -
- list - / elements=string -
-
- -
The IDs of specific endpoints to retrieve the details of.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Simple example of listing all support AWS services for VPC endpoints - - name: List supported AWS endpoint services - amazon.aws.ec2_vpc_endpoint_info: - query: services - region: ap-southeast-2 - register: supported_endpoint_services - - - name: Get all endpoints in ap-southeast-2 region - amazon.aws.ec2_vpc_endpoint_info: - query: endpoints - region: ap-southeast-2 - register: existing_endpoints - - - name: Get all endpoints with specific filters - amazon.aws.ec2_vpc_endpoint_info: - query: endpoints - region: ap-southeast-2 - filters: - vpc-id: - - vpc-12345678 - - vpc-87654321 - vpc-endpoint-state: - - available - - pending - register: existing_endpoints - - - name: Get details on specific endpoint - amazon.aws.ec2_vpc_endpoint_info: - query: endpoints - region: ap-southeast-2 - vpc_endpoint_ids: - - vpce-12345678 - register: endpoint_details - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- service_names - -
- list -
-
query is services -
AWS VPC endpoint service names
-
-
Sample:
-
{'service_names': ['com.amazonaws.ap-southeast-2.s3']}
-
-
- vpc_endpoints - -
- list -
-
query is endpoints -
A list of endpoints that match the query. Each endpoint has the keys creation_timestamp, policy_document, route_table_ids, service_name, state, vpc_endpoint_id, vpc_id.
-
-
Sample:
-
{'vpc_endpoints': [{'creation_timestamp': '2017-02-16T11:06:48+00:00', 'policy_document': '"{\\"Version\\":\\"2012-10-17\\",\\"Id\\":\\"Policy1450910922815\\", \\"Statement\\":[{\\"Sid\\":\\"Stmt1450910920641\\",\\"Effect\\":\\"Allow\\", \\"Principal\\":\\"*\\",\\"Action\\":\\"s3:*\\",\\"Resource\\":[\\"arn:aws:s3:::*/*\\",\\"arn:aws:s3:::*\\"]}]}"\n', 'route_table_ids': ['rtb-abcd1234'], 'service_name': 'com.amazonaws.ap-southeast-2.s3', 'state': 'available', 'vpc_endpoint_id': 'vpce-abbad0d0', 'vpc_id': 'vpc-1111ffff'}]}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Karen Cheng (@Etherdaemon) diff --git a/docs/amazon.aws.ec2_vpc_endpoint_module.rst b/docs/amazon.aws.ec2_vpc_endpoint_module.rst deleted file mode 100644 index 2cea1e7f95a..00000000000 --- a/docs/amazon.aws.ec2_vpc_endpoint_module.rst +++ /dev/null @@ -1,588 +0,0 @@ -.. _amazon.aws.ec2_vpc_endpoint_module: - - -*************************** -amazon.aws.ec2_vpc_endpoint -*************************** - -**Create and delete AWS VPC Endpoints.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates AWS VPC endpoints. -- Deletes AWS VPC endpoints. -- This module supports check mode. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_secret_key, secret_key
-
-
- client_token - -
- string -
-
- -
Optional client token to ensure idempotency
-
-
- 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- policy - -
- json -
-
- -
A properly formatted json policy as string, see https://github.com/ansible/ansible/issues/7005#issuecomment-42894813. Cannot be used with policy_file.
-
Option when creating an endpoint. If not provided AWS will utilise a default policy which provides full access to the service.
-
-
- policy_file - -
- path -
-
- -
The path to the properly json formatted policy file, see https://github.com/ansible/ansible/issues/7005#issuecomment-42894813 on how to use it properly. Cannot be used with policy.
-
Option when creating an endpoint. If not provided AWS will utilise a default policy which provides full access to the service.
-
This option has been deprecated and will be removed after 2022-12-01 to maintain the existing functionality please use the policy option and a file lookup.
-

aliases: policy_path
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_tags - -
- boolean -
-
added in 1.5.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Delete any tags not specified in the task that are on the instance. This means you have to specify all the desired tags on each task affecting an 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
-
-
- route_table_ids - -
- list - / elements=string -
-
- -
List of one or more route table ids to attach to the endpoint. A route is added to the route table with the destination of the endpoint if provided.
-
Route table ids are only valid for gateway type endpoints.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- service - -
- string -
-
- -
An AWS supported vpc endpoint service. Use the amazon.aws.ec2_vpc_endpoint_info module to describe the supported endpoint services.
-
Required when creating an endpoint.
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
present to ensure resource is created.
-
absent to remove resource
-
-
- tags - -
- dictionary -
-
added in 1.5.0
-
- -
A dict of tags to apply to the internet gateway.
-
To remove all tags set tags={} and purge_tags=true.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- vpc_endpoint_id - -
- string -
-
- -
One or more vpc endpoint ids to remove from the AWS account
-
-
- vpc_endpoint_security_groups - -
- list - / elements=string -
-
added in 2.1.0
-
- -
The list of security groups to attach to the endpoint.
-
Requires vpc_endpoint_type=GatewayLoadBalancer or vpc_endpoint_type=Interface.
-
-
- vpc_endpoint_subnets - -
- list - / elements=string -
-
added in 2.1.0
-
- -
The list of subnets to attach to the endpoint.
-
Requires vpc_endpoint_type=GatewayLoadBalancer or vpc_endpoint_type=Interface.
-
-
- vpc_endpoint_type - -
- string -
-
added in 1.5.0
-
-
    Choices: -
  • Interface
  • -
  • Gateway ←
  • -
  • GatewayLoadBalancer
  • -
-
-
The type of endpoint.
-
-
- vpc_id - -
- string -
-
- -
Required when creating a VPC endpoint.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
When specified, will wait for either available status for state present. Unfortunately this is ignored for delete actions due to a difference in behaviour from AWS.
-
-
- wait_timeout - -
- integer -
-
- Default:
320
-
-
Used in conjunction with wait. Number of seconds to wait for status. Unfortunately this is ignored for delete actions due to a difference in behaviour from AWS.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Create new vpc endpoint with a json template for policy - amazon.aws.ec2_vpc_endpoint: - state: present - region: ap-southeast-2 - vpc_id: vpc-12345678 - service: com.amazonaws.ap-southeast-2.s3 - policy: " {{ lookup( 'template', 'endpoint_policy.json.j2') }} " - route_table_ids: - - rtb-12345678 - - rtb-87654321 - register: new_vpc_endpoint - - - name: Create new vpc endpoint with the default policy - amazon.aws.ec2_vpc_endpoint: - state: present - region: ap-southeast-2 - vpc_id: vpc-12345678 - service: com.amazonaws.ap-southeast-2.s3 - route_table_ids: - - rtb-12345678 - - rtb-87654321 - register: new_vpc_endpoint - - - name: Create new vpc endpoint with json file - amazon.aws.ec2_vpc_endpoint: - state: present - region: ap-southeast-2 - vpc_id: vpc-12345678 - service: com.amazonaws.ap-southeast-2.s3 - policy_file: "{{ role_path }}/files/endpoint_policy.json" - route_table_ids: - - rtb-12345678 - - rtb-87654321 - register: new_vpc_endpoint - - - name: Delete newly created vpc endpoint - amazon.aws.ec2_vpc_endpoint: - state: absent - vpc_endpoint_id: "{{ new_vpc_endpoint.result['VpcEndpointId'] }}" - region: ap-southeast-2 - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - -
KeyReturnedDescription
-
- endpoints - -
- list -
-
success -
The resulting endpoints from the module call
-
-
Sample:
-
[{'creation_timestamp': '2017-02-20T05:04:15+00:00', 'policy_document': {'Id': 'Policy1450910922815', 'Statement': [{'Action': 's3:*', 'Effect': 'Allow', 'Principal': '*', 'Resource': ['arn:aws:s3:::*/*', 'arn:aws:s3:::*'], 'Sid': 'Stmt1450910920641'}], 'Version': '2012-10-17'}, 'route_table_ids': ['rtb-abcd1234'], 'service_name': 'com.amazonaws.ap-southeast-2.s3', 'vpc_endpoint_id': 'vpce-a1b2c3d4', 'vpc_id': 'vpc-abbad0d0'}]
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Karen Cheng (@Etherdaemon) diff --git a/docs/amazon.aws.ec2_vpc_endpoint_service_info_module.rst b/docs/amazon.aws.ec2_vpc_endpoint_service_info_module.rst deleted file mode 100644 index 835237586e0..00000000000 --- a/docs/amazon.aws.ec2_vpc_endpoint_service_info_module.rst +++ /dev/null @@ -1,545 +0,0 @@ -.. _amazon.aws.ec2_vpc_endpoint_service_info_module: - - -**************************************** -amazon.aws.ec2_vpc_endpoint_service_info -**************************************** - -**retrieves AWS VPC endpoint service details** - - -Version added: 1.5.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gets details related to AWS VPC Endpoint Services. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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_DescribeVpcEndpointServices.html for possible filters.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- service_names - -
- list - / elements=string -
-
- -
A list of service names which can be used to narrow the search results.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Simple example of listing all supported AWS services for VPC endpoints - - name: List supported AWS endpoint services - amazon.aws.ec2_vpc_endpoint_service_info: - region: ap-southeast-2 - register: supported_endpoint_services - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- service_details - -
- complex -
-
success -
Detailed information about the AWS VPC endpoint services.
-
-
  -
- acceptance_required - -
- boolean -
-
success -
Whether VPC endpoint connection requests to the service must be accepted by the service owner.
-
-
  -
- availability_zones - -
- list -
-
success -
The Availability Zones in which the service is available.
-
-
  -
- base_endpoint_dns_names - -
- list -
-
success -
The DNS names for the service.
-
-
  -
- manages_vpc_endpoints - -
- boolean -
-
success -
Whether the service manages its VPC endpoints.
-
-
  -
- owner - -
- string -
-
success -
The AWS account ID of the service owner.
-
-
  -
- private_dns_name - -
- string -
-
success -
The private DNS name for the service.
-
-
  -
- private_dns_name_verification_state - -
- string -
-
success -
The verification state of the VPC endpoint service.
-
Consumers of an endpoint service cannot use the private name when the state is not verified.
-
-
  -
- private_dns_names - -
- list -
-
success -
The private DNS names assigned to the VPC endpoint service.
-
-
  -
- service_id - -
- string -
-
success -
The ID of the endpoint service.
-
-
  -
- service_name - -
- string -
-
success -
The ARN of the endpoint service.
-
-
  -
- service_type - -
- list -
-
success -
The type of the service
-
-
  -
- tags - -
- dictionary -
-
success -
A dict of tags associated with the service
-
-
  -
- vpc_endpoint_policy_supported - -
- boolean -
-
success -
Whether the service supports endpoint policies.
-
-
-
- service_names - -
- list -
-
success -
List of supported AWS VPC endpoint service names.
-
-
Sample:
-
{'service_names': ['com.amazonaws.ap-southeast-2.s3']}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Mark Chappell (@tremble) diff --git a/docs/amazon.aws.ec2_vpc_igw_info_module.rst b/docs/amazon.aws.ec2_vpc_igw_info_module.rst deleted file mode 100644 index fe7b5d4022b..00000000000 --- a/docs/amazon.aws.ec2_vpc_igw_info_module.rst +++ /dev/null @@ -1,464 +0,0 @@ -.. _amazon.aws.ec2_vpc_igw_info_module: - - -*************************** -amazon.aws.ec2_vpc_igw_info -*************************** - -**Gather information about internet gateways in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about internet gateways in AWS. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_secret_key, secret_key
-
-
- convert_tags - -
- boolean -
-
added in 1.3.0
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Convert tags from boto3 format (list of dictionaries) to the standard dictionary format.
-
This currently defaults to False. The default will be changed to True after 2022-06-22.
-
-
- 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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_DescribeInternetGateways.html for possible filters.
-
-
- internet_gateway_ids - -
- list - / elements=string -
-
- -
Get details of specific Internet Gateway ID. Provide this value as a list.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Gather information about all Internet Gateways for an account or profile - amazon.aws.ec2_vpc_igw_info: - region: ap-southeast-2 - profile: production - register: igw_info - - - name: Gather information about a filtered list of Internet Gateways - amazon.aws.ec2_vpc_igw_info: - region: ap-southeast-2 - profile: production - filters: - "tag:Name": "igw-123" - register: igw_info - - - name: Gather information about a specific internet gateway by InternetGatewayId - amazon.aws.ec2_vpc_igw_info: - region: ap-southeast-2 - profile: production - internet_gateway_ids: igw-c1231234 - register: igw_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 internet gateways succeeds.
-
-
Sample:
-
false
-
-
- internet_gateways - -
- complex -
-
always -
The internet gateways for the account.
-
-
  -
- attachments - -
- complex -
-
state=present -
Any VPCs attached to the internet gateway
-
-
   -
- state - -
- string -
-
state=present -
The current state of the attachment
-
-
Sample:
-
available
-
   -
- vpc_id - -
- string -
-
state=present -
The ID of the VPC.
-
-
Sample:
-
vpc-02123b67
-
  -
- internet_gateway_id - -
- string -
-
state=present -
The ID of the internet gateway
-
-
Sample:
-
igw-2123634d
-
  -
- tags - -
- dictionary -
-
state=present -
Any tags assigned to the internet gateway
-
-
Sample:
-
{'tags': {'Ansible': 'Test'}}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Nick Aslanidis (@naslanidis) diff --git a/docs/amazon.aws.ec2_vpc_igw_module.rst b/docs/amazon.aws.ec2_vpc_igw_module.rst deleted file mode 100644 index a24b792f288..00000000000 --- a/docs/amazon.aws.ec2_vpc_igw_module.rst +++ /dev/null @@ -1,430 +0,0 @@ -.. _amazon.aws.ec2_vpc_igw_module: - - -********************** -amazon.aws.ec2_vpc_igw -********************** - -**Manage an AWS VPC Internet gateway** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage an AWS VPC Internet gateway - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_tags - -
- boolean -
-
added in 1.3.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Remove tags not listed in tags.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Create or terminate the IGW
-
-
- tags - -
- dictionary -
-
- -
A dict of tags to apply to the internet gateway.
-
To remove all tags set tags={} and purge_tags=true.
-

aliases: resource_tags
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- vpc_id - -
- string - / required -
-
- -
The VPC ID for the VPC in which to manage the Internet Gateway.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Ensure that the VPC has an Internet Gateway. - # The Internet Gateway ID is can be accessed via {{igw.gateway_id}} for use in setting up NATs etc. - - name: Create Internet gateway - amazon.aws.ec2_vpc_igw: - vpc_id: vpc-abcdefgh - state: present - register: igw - - - name: Create Internet gateway with tags - amazon.aws.ec2_vpc_igw: - vpc_id: vpc-abcdefgh - state: present - tags: - Tag1: tag1 - Tag2: tag2 - register: igw - - - name: Delete Internet gateway - amazon.aws.ec2_vpc_igw: - state: absent - vpc_id: vpc-abcdefgh - register: vpc_igw_delete - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- changed - -
- boolean -
-
always -
If any changes have been made to the Internet Gateway.
-
-
Sample:
-
{'changed': False}
-
-
- gateway_id - -
- string -
-
state=present -
The unique identifier for the Internet Gateway.
-
-
Sample:
-
{'gateway_id': 'igw-XXXXXXXX'}
-
-
- tags - -
- dictionary -
-
state=present -
The tags associated the Internet Gateway.
-
-
Sample:
-
{'tags': {'Ansible': 'Test'}}
-
-
- vpc_id - -
- string -
-
state=present -
The VPC ID associated with the Internet Gateway.
-
-
Sample:
-
{'vpc_id': 'vpc-XXXXXXXX'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Robert Estelle (@erydo) diff --git a/docs/amazon.aws.ec2_vpc_nat_gateway_info_module.rst b/docs/amazon.aws.ec2_vpc_nat_gateway_info_module.rst deleted file mode 100644 index 7dee973a792..00000000000 --- a/docs/amazon.aws.ec2_vpc_nat_gateway_info_module.rst +++ /dev/null @@ -1,580 +0,0 @@ -.. _amazon.aws.ec2_vpc_nat_gateway_info_module: - - -*********************************** -amazon.aws.ec2_vpc_nat_gateway_info -*********************************** - -**Retrieves AWS VPC Managed Nat Gateway details using AWS methods.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gets various details related to AWS VPC Managed Nat Gateways - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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_DescribeNatGateways.html for possible filters.
-
-
- nat_gateway_ids - -
- list - / elements=string -
-
- -
List of specific nat gateway IDs to fetch details for.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Simple example of listing all nat gateways - - name: List all managed nat gateways in ap-southeast-2 - amazon.aws.ec2_vpc_nat_gateway_info: - region: ap-southeast-2 - register: all_ngws - - - name: Debugging the result - ansible.builtin.debug: - msg: "{{ all_ngws.result }}" - - - name: Get details on specific nat gateways - amazon.aws.ec2_vpc_nat_gateway_info: - nat_gateway_ids: - - nat-1234567891234567 - - nat-7654321987654321 - region: ap-southeast-2 - register: specific_ngws - - - name: Get all nat gateways with specific filters - amazon.aws.ec2_vpc_nat_gateway_info: - region: ap-southeast-2 - filters: - state: ['pending'] - register: pending_ngws - - - name: Get nat gateways with specific filter - amazon.aws.ec2_vpc_nat_gateway_info: - region: ap-southeast-2 - filters: - subnet-id: subnet-12345678 - state: ['available'] - register: existing_nat_gateways - - - -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 internet gateways succeeds
-
-
-
- result - -
- list -
-
suceess -
The result of the describe, converted to ansible snake case style.
- -
-
  -
- create_time - -
- string -
-
always -
The date and time the NAT gateway was created
-
-
Sample:
-
2021-03-11T22:43:25+00:00
-
  -
- delete_time - -
- string -
-
when the NAT gateway has been deleted -
The date and time the NAT gateway was deleted
-
-
Sample:
-
2021-03-11T22:43:25+00:00
-
  -
- nat_gateway_addresses - -
- dictionary -
-
always -
List containing a dictionary with the IP addresses and network interface associated with the NAT gateway
-
-
   -
- allocation_id - -
- string -
-
always -
The allocation ID of the Elastic IP address that's associated with the NAT gateway
-
-
Sample:
-
eipalloc-0853e66a40803da76
-
   -
- network_interface_id - -
- string -
-
always -
The ID of the network interface associated with the NAT gateway
-
-
Sample:
-
eni-0a37acdbe306c661c
-
   -
- private_ip - -
- string -
-
always -
The private IP address associated with the Elastic IP address
-
-
Sample:
-
10.0.238.227
-
   -
- public_ip - -
- string -
-
always -
The Elastic IP address associated with the NAT gateway
-
-
Sample:
-
34.204.123.52
-
  -
- nat_gateway_id - -
- string -
-
always -
The ID of the NAT gateway
-
-
Sample:
-
nat-0c242a2397acf6173
-
  -
- state - -
- string -
-
always -
state of the NAT gateway
-
-
Sample:
-
available
-
  -
- subnet_id - -
- string -
-
always -
The ID of the subnet in which the NAT gateway is located
-
-
Sample:
-
subnet-098c447465d4344f9
-
  -
- tags - -
- dictionary -
-
always -
Tags applied to the NAT gateway
-
-
Sample:
-
{'Tag1': 'tag1', 'Tag_2': 'tag_2'}
-
  -
- vpc_id - -
- string -
-
always -
The ID of the VPC in which the NAT gateway is located
-
-
Sample:
-
vpc-02f37f48438ab7d4c
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Karen Cheng (@Etherdaemon) diff --git a/docs/amazon.aws.ec2_vpc_nat_gateway_module.rst b/docs/amazon.aws.ec2_vpc_nat_gateway_module.rst deleted file mode 100644 index 1d7d2966ec6..00000000000 --- a/docs/amazon.aws.ec2_vpc_nat_gateway_module.rst +++ /dev/null @@ -1,688 +0,0 @@ -.. _amazon.aws.ec2_vpc_nat_gateway_module: - - -****************************** -amazon.aws.ec2_vpc_nat_gateway -****************************** - -**Manage AWS VPC NAT Gateways.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Ensure the state of AWS VPC NAT Gateways based on their id, allocation and subnet ids. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- allocation_id - -
- string -
-
- -
The id of the elastic IP allocation. If this is not passed and the eip_address is not passed. An EIP is generated for this NAT Gateway.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_secret_key, secret_key
-
-
- client_token - -
- string -
-
- -
Optional unique token to be used during create to ensure idempotency. When specifying this option, ensure you specify the eip_address parameter as well otherwise any subsequent runs will fail.
-
-
- 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- eip_address - -
- string -
-
- -
The elastic IP address of the EIP you want attached to this NAT Gateway. If this is not passed and the allocation_id is not passed, an EIP is generated for this NAT Gateway.
-
-
- if_exist_do_not_create - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
if a NAT Gateway exists already in the subnet_id, then do not create a new one.
-
-
- nat_gateway_id - -
- string -
-
- -
The id AWS dynamically allocates to the NAT Gateway on creation. This is required when the absent option is present.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- purge_tags - -
- boolean -
-
added in 1.4.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Remove tags not listed in tags.
-
-
- 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
-
-
- release_eip - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Deallocate the EIP from the VPC.
-
Option is only valid with the absent state.
-
You should use this with the wait option. Since you can not release an address while a delete operation is happening.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Ensure NAT Gateway is present or absent.
-
-
- subnet_id - -
- string -
-
- -
The id of the subnet to create the NAT Gateway in. This is required with the present option.
-
-
- tags - -
- dictionary -
-
added in 1.4.0
-
- -
A dict of tags to apply to the NAT gateway.
-
To remove all tags set tags={} and purge_tags=true.
-

aliases: resource_tags
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Wait for operation to complete before returning.
-
-
- wait_timeout - -
- integer -
-
- Default:
320
-
-
How many seconds to wait for an operation to complete before timing out.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Create new nat gateway with client token. - amazon.aws.ec2_vpc_nat_gateway: - state: present - subnet_id: subnet-12345678 - eip_address: 52.1.1.1 - region: ap-southeast-2 - client_token: abcd-12345678 - register: new_nat_gateway - - - name: Create new nat gateway using an allocation-id. - amazon.aws.ec2_vpc_nat_gateway: - state: present - subnet_id: subnet-12345678 - allocation_id: eipalloc-12345678 - region: ap-southeast-2 - register: new_nat_gateway - - - name: Create new nat gateway, using an EIP address and wait for available status. - amazon.aws.ec2_vpc_nat_gateway: - state: present - subnet_id: subnet-12345678 - eip_address: 52.1.1.1 - wait: true - region: ap-southeast-2 - register: new_nat_gateway - - - name: Create new nat gateway and allocate new EIP. - amazon.aws.ec2_vpc_nat_gateway: - state: present - subnet_id: subnet-12345678 - wait: true - region: ap-southeast-2 - register: new_nat_gateway - - - name: Create new nat gateway and allocate new EIP if a nat gateway does not yet exist in the subnet. - amazon.aws.ec2_vpc_nat_gateway: - state: present - subnet_id: subnet-12345678 - wait: true - region: ap-southeast-2 - if_exist_do_not_create: true - register: new_nat_gateway - - - name: Delete nat gateway using discovered nat gateways from facts module. - amazon.aws.ec2_vpc_nat_gateway: - state: absent - region: ap-southeast-2 - wait: true - nat_gateway_id: "{{ item.NatGatewayId }}" - release_eip: true - register: delete_nat_gateway_result - loop: "{{ gateways_to_remove.result }}" - - - name: Delete nat gateway and wait for deleted status. - amazon.aws.ec2_vpc_nat_gateway: - state: absent - nat_gateway_id: nat-12345678 - wait: true - wait_timeout: 500 - region: ap-southeast-2 - - - name: Delete nat gateway and release EIP. - amazon.aws.ec2_vpc_nat_gateway: - state: absent - nat_gateway_id: nat-12345678 - release_eip: true - wait: yes - wait_timeout: 300 - region: ap-southeast-2 - - - name: Create new nat gateway using allocation-id and tags. - amazon.aws.ec2_vpc_nat_gateway: - state: present - subnet_id: subnet-12345678 - allocation_id: eipalloc-12345678 - region: ap-southeast-2 - tags: - Tag1: tag1 - Tag2: tag2 - register: new_nat_gateway - - - name: Update tags without purge - amazon.aws.ec2_vpc_nat_gateway: - subnet_id: subnet-12345678 - allocation_id: eipalloc-12345678 - region: ap-southeast-2 - purge_tags: no - tags: - Tag3: tag3 - wait: yes - register: update_tags_nat_gateway - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- create_time - -
- string -
-
In all cases. -
The ISO 8601 date time format in UTC.
-
-
Sample:
-
2016-03-05T05:19:20.282000+00:00'
-
-
- nat_gateway_addresses - -
- string -
-
In all cases. -
List of dictionaries containing the public_ip, network_interface_id, private_ip, and allocation_id.
-
-
Sample:
-
[{'public_ip': '52.52.52.52', 'network_interface_id': 'eni-12345', 'private_ip': '10.0.0.100', 'allocation_id': 'eipalloc-12345'}]
-
-
- nat_gateway_id - -
- string -
-
In all cases. -
id of the VPC NAT Gateway
-
-
Sample:
-
nat-0d1e3a878585988f8
-
-
- state - -
- string -
-
In all cases. -
The current state of the NAT Gateway.
-
-
Sample:
-
available
-
-
- subnet_id - -
- string -
-
In all cases. -
id of the Subnet
-
-
Sample:
-
subnet-12345
-
-
- tags - -
- dictionary -
-
When tags are present. -
The tags associated the VPC NAT Gateway.
-
-
Sample:
-
{'tags': {'Ansible': 'Test'}}
-
-
- vpc_id - -
- string -
-
In all cases. -
id of the VPC.
-
-
Sample:
-
vpc-12345
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Allen Sanabria (@linuxdynasty) -- Jon Hadfield (@jonhadfield) -- Karen Cheng (@Etherdaemon) -- Alina Buzachis (@alinabuzachis) diff --git a/docs/amazon.aws.ec2_vpc_net_info_module.rst b/docs/amazon.aws.ec2_vpc_net_info_module.rst deleted file mode 100644 index 8105eae509b..00000000000 --- a/docs/amazon.aws.ec2_vpc_net_info_module.rst +++ /dev/null @@ -1,712 +0,0 @@ -.. _amazon.aws.ec2_vpc_net_info_module: - - -*************************** -amazon.aws.ec2_vpc_net_info -*************************** - -**Gather information about ec2 VPCs in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 VPCs in AWS - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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.
-
-
  -
- dhcp_options_id - -
- string -
-
always -
The ID of the DHCP options associated with this VPC.
-
-
Sample:
-
dopt-12345678
-
  -
- 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.
-
-
  -
- owner_id - -
- string -
-
always -
The AWS account which owns the VPC.
-
-
Sample:
-
123456789012
-
  -
- 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) diff --git a/docs/amazon.aws.ec2_vpc_net_module.rst b/docs/amazon.aws.ec2_vpc_net_module.rst deleted file mode 100644 index 5c293aaac5c..00000000000 --- a/docs/amazon.aws.ec2_vpc_net_module.rst +++ /dev/null @@ -1,712 +0,0 @@ -.. _amazon.aws.ec2_vpc_net_module: - - -********************** -amazon.aws.ec2_vpc_net -********************** - -**Configure AWS virtual private clouds** - - -Version added: 1.0.0 - -.. 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. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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.
-
Default value is false when creating a new VPC.
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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 communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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': '10.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-12345678
-
  -
- id - -
- string -
-
always -
VPC resource id
-
-
Sample:
-
vpc-12345678
-
  -
- 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
-
-
  -
- owner_id - -
- string -
-
always -
The AWS account which owns the VPC.
-
-
Sample:
-
123456789012
-
  -
- 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) diff --git a/docs/amazon.aws.ec2_vpc_route_table_info_module.rst b/docs/amazon.aws.ec2_vpc_route_table_info_module.rst deleted file mode 100644 index 34b9cc5ab28..00000000000 --- a/docs/amazon.aws.ec2_vpc_route_table_info_module.rst +++ /dev/null @@ -1,764 +0,0 @@ -.. _amazon.aws.ec2_vpc_route_table_info_module: - - -*********************************** -amazon.aws.ec2_vpc_route_table_info -*********************************** - -**Gather information about ec2 VPC route tables in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 VPC route tables in AWS - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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_DescribeRouteTables.html for possible filters.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - - name: Gather information about all VPC route tables - amazon.aws.ec2_vpc_route_table_info: - - - name: Gather information about a particular VPC route table using route table ID - amazon.aws.ec2_vpc_route_table_info: - filters: - route-table-id: rtb-00112233 - - - name: Gather information about any VPC route table with a tag key Name and value Example - amazon.aws.ec2_vpc_route_table_info: - filters: - "tag:Name": Example - - - name: Gather information about any VPC route table within VPC with ID vpc-abcdef00 - amazon.aws.ec2_vpc_route_table_info: - filters: - vpc-id: vpc-abcdef00 - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- route_tables - -
- complex -
-
always -
A list of dictionarys describing route tables
- -
-
  -
- associations - -
- complex -
-
always -
List of associations between the route table and one or more subnets or a gateway
-
-
   -
- association_state - -
- complex -
-
always -
The state of the association
-
-
    -
- state - -
- string -
-
always -
The state of the association
-
-
Sample:
-
associated
-
    -
- state_message - -
- string -
-
when available -
Additional information about the state of the association
-
-
Sample:
-
Creating association
-
   -
- gateway_id - -
- string -
-
when route table is a gateway route table -
ID of the internet gateway or virtual private gateway
-
-
Sample:
-
igw-03312309
-
   -
- main - -
- boolean -
-
always -
Whether this is the main route table
-
-
   -
- route_table_association_id - -
- string -
-
always -
ID of association between route table and subnet
-
-
Sample:
-
rtbassoc-ab47cfc3
-
   -
- route_table_id - -
- string -
-
always -
ID of the route table
-
-
Sample:
-
rtb-bf779ed7
-
   -
- subnet_id - -
- string -
-
when route table is a subnet route table -
ID of the subnet
-
-
Sample:
-
subnet-82055af9
-
  -
- id - -
- string -
-
always -
ID of the route table (same as route_table_id for backwards compatibility)
-
-
Sample:
-
rtb-bf779ed7
-
  -
- owner_id - -
- string -
-
always -
ID of the account which owns the route table
-
-
Sample:
-
012345678912
-
  -
- propagating_vgws - -
- list -
-
always -
List of Virtual Private Gateways propagating routes
-
-
  -
- route_table_id - -
- string -
-
always -
ID of the route table
-
-
Sample:
-
rtb-bf779ed7
-
  -
- routes - -
- complex -
-
always -
List of routes in the route table
-
-
   -
- destination_cidr_block - -
- string -
-
always -
CIDR block of destination
-
-
Sample:
-
10.228.228.0/22
-
   -
- gateway_id - -
- string -
-
when gateway is local or internet gateway -
ID of the gateway
-
-
Sample:
-
local
-
   -
- instance_id - -
- string -
-
always -
ID of a NAT instance.
-
Empty unless the route is via an EC2 instance
-
-
Sample:
-
i-abcd123456789
-
   -
- instance_owner_id - -
- string -
-
always -
AWS account owning the NAT instance
-
Empty unless the route is via an EC2 instance
-
-
Sample:
-
123456789012
-
   -
- nat_gateway_id - -
- string -
-
when the route is via a NAT gateway -
ID of the NAT gateway
-
-
Sample:
-
local
-
   -
- network_interface_id - -
- string -
-
always -
The ID of the network interface
-
Empty unless the route is via an EC2 instance
-
-
Sample:
-
123456789012
-
   -
- origin - -
- string -
-
always -
mechanism through which the route is in the table
-
-
Sample:
-
CreateRouteTable
-
   -
- state - -
- string -
-
always -
state of the route
-
-
Sample:
-
active
-
  -
- tags - -
- dictionary -
-
always -
Tags applied to the route table
-
-
Sample:
-
{'Name': 'Public route table', 'Public': 'true'}
-
  -
- vpc_id - -
- string -
-
always -
ID for the VPC in which the route lives
-
-
Sample:
-
vpc-6e2d2407
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) -- Mark Chappell (@tremble) diff --git a/docs/amazon.aws.ec2_vpc_route_table_module.rst b/docs/amazon.aws.ec2_vpc_route_table_module.rst deleted file mode 100644 index c16786d6a64..00000000000 --- a/docs/amazon.aws.ec2_vpc_route_table_module.rst +++ /dev/null @@ -1,984 +0,0 @@ -.. _amazon.aws.ec2_vpc_route_table_module: - - -****************************** -amazon.aws.ec2_vpc_route_table -****************************** - -**Manage route tables for AWS virtual private clouds** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manage route tables for AWS virtual private clouds - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- gateway_id - -
- string -
-
added in 3.2.0
-
- -
The ID of the gateway to associate with the route table.
-
If gateway_id is 'None' or '', gateway will be disassociated with the route table.
-
-
- lookup - -
- string -
-
-
    Choices: -
  • tag ←
  • -
  • id
  • -
-
-
Look up route table by either tags or by route table ID. Non-unique tag lookup will fail. If no tags are specified then no lookup for an existing route table is performed and a new route table will be created. To change tags of a route table you must look up by id.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- propagating_vgw_ids - -
- list - / elements=string -
-
- -
Enable route propagation from virtual gateways specified by ID.
-
-
- purge_routes - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Purge existing routes that are not found in routes.
-
-
- purge_subnets - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Purge existing subnets that are not found in subnets. Ignored unless the subnets option is supplied.
-
-
- purge_tags - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Purge existing tags that are not found in route table.
-
-
- 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
-
-
- route_table_id - -
- string -
-
- -
The ID of the route table to update or delete.
-
Required when lookup=id.
-
-
- routes - -
- list - / elements=dictionary -
-
- -
List of routes in the route table.
-
Routes are specified as dicts containing the keys dest and one of gateway_id, instance_id, network_interface_id, or vpc_peering_connection_id.
-
The value of dest is used for the destination match. It may be a IPv4 CIDR block or a IPv6 CIDR block.
-
If gateway_id is specified, you can refer to the VPC's IGW by using the value igw.
-
Routes are required for present states.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Create or destroy the VPC route table.
-
-
- subnets - -
- list - / elements=string -
-
- -
An array of subnets to add to this route table. Subnets may be specified by either subnet ID, Name tag, or by a CIDR such as '10.0.0.0/24' or 'fd00::/8'.
-
-
- tags - -
- dictionary -
-
- -
A dictionary of resource tags of the form: { tag1: value1, tag2: value2 }. Tags are used to uniquely identify route tables within a VPC when the route_table_id is not supplied.
-

aliases: resource_tags
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- vpc_id - -
- string -
-
- -
VPC ID of the VPC in which to create the route table.
-
Required when state=present or lookup=tag.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # Note: These examples do not set authentication details, see the AWS Guide for details. - - # Basic creation example: - - name: Set up public subnet route table - amazon.aws.ec2_vpc_route_table: - vpc_id: vpc-1245678 - region: us-west-1 - tags: - Name: Public - subnets: - - "{{ jumpbox_subnet.subnet.id }}" - - "{{ frontend_subnet.subnet.id }}" - - "{{ vpn_subnet.subnet_id }}" - routes: - - dest: 0.0.0.0/0 - gateway_id: "{{ igw.gateway_id }}" - - dest: ::/0 - gateway_id: "{{ igw.gateway_id }}" - register: public_route_table - - - name: Create vpc gateway - amazon.aws.ec2_vpc_igw: - vpc_id: vpc-1245678 - register: vpc_igw - - - name: Create gateway route table - amazon.aws.ec2_vpc_route_table: - vpc_id: vpc-1245678 - tags: - Name: Gateway route table - gateway_id: "{{ vpc_igw.gateway_id }}" - register: gateway_route_table - - - name: Disassociate gateway from route table - amazon.aws.ec2_vpc_route_table: - vpc_id: vpc-1245678 - tags: - Name: Gateway route table - gateway_id: None - register: gateway_route_table - - - name: Set up NAT-protected route table - amazon.aws.ec2_vpc_route_table: - vpc_id: vpc-1245678 - region: us-west-1 - tags: - Name: Internal - subnets: - - "{{ application_subnet.subnet.id }}" - - 'Database Subnet' - - '10.0.0.0/8' - routes: - - dest: 0.0.0.0/0 - instance_id: "{{ nat.instance_id }}" - register: nat_route_table - - - name: delete route table - amazon.aws.ec2_vpc_route_table: - vpc_id: vpc-1245678 - region: us-west-1 - route_table_id: "{{ route_table.id }}" - lookup: id - state: absent - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- route_table - -
- complex -
-
always -
Route Table result.
-
-
  -
- associations - -
- complex -
-
always -
List of associations between the route table and one or more subnets or a gateway.
-
-
   -
- association_state - -
- complex -
-
always -
The state of the association.
-
-
    -
- state - -
- string -
-
always -
The state of the association.
-
-
Sample:
-
associated
-
    -
- state_message - -
- string -
-
when available -
Additional information about the state of the association.
-
-
Sample:
-
Creating association
-
   -
- gateway_id - -
- string -
-
when route table is a gateway route table -
ID of the internet gateway or virtual private gateway.
-
-
Sample:
-
igw-03312309
-
   -
- main - -
- boolean -
-
always -
Whether this is the main route table.
-
-
   -
- route_table_association_id - -
- string -
-
always -
ID of association between route table and subnet.
-
-
Sample:
-
rtbassoc-ab47cfc3
-
   -
- route_table_id - -
- string -
-
always -
ID of the route table.
-
-
Sample:
-
rtb-bf779ed7
-
   -
- subnet_id - -
- string -
-
when route table is a subnet route table -
ID of the subnet.
-
-
Sample:
-
subnet-82055af9
-
  -
- id - -
- string -
-
always -
ID of the route table (same as route_table_id for backwards compatibility).
-
-
Sample:
-
rtb-bf779ed7
-
  -
- propagating_vgws - -
- list -
-
always -
List of Virtual Private Gateways propagating routes.
-
-
  -
- route_table_id - -
- string -
-
always -
ID of the route table.
-
-
Sample:
-
rtb-bf779ed7
-
  -
- routes - -
- complex -
-
always -
List of routes in the route table.
-
-
   -
- destination_cidr_block - -
- string -
-
always -
IPv4 CIDR block of destination
-
-
Sample:
-
10.228.228.0/22
-
   -
- destination_ipv6_cidr_block - -
- string -
-
when the route includes an IPv6 destination -
IPv6 CIDR block of destination
-
-
Sample:
-
2600:1f1c:1b3:8f00:8000::/65
-
   -
- gateway_id - -
- string -
-
when gateway is local or internet gateway -
ID of the gateway.
-
-
Sample:
-
local
-
   -
- instance_id - -
- string -
-
when the route is via an EC2 instance -
ID of a NAT instance.
-
-
Sample:
-
i-abcd123456789
-
   -
- instance_owner_id - -
- string -
-
when the route is via an EC2 instance -
AWS account owning the NAT instance.
-
-
Sample:
-
123456789012
-
   -
- nat_gateway_id - -
- string -
-
when the route is via a NAT gateway -
ID of the NAT gateway.
-
-
Sample:
-
local
-
   -
- origin - -
- string -
-
always -
mechanism through which the route is in the table.
-
-
Sample:
-
CreateRouteTable
-
   -
- state - -
- string -
-
always -
state of the route.
-
-
Sample:
-
active
-
  -
- tags - -
- dictionary -
-
always -
Tags applied to the route table.
-
-
Sample:
-
{'Name': 'Public route table', 'Public': 'true'}
-
  -
- vpc_id - -
- string -
-
always -
ID for the VPC in which the route lives.
-
-
Sample:
-
vpc-6e2d2407
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Robert Estelle (@erydo) -- Rob White (@wimnat) -- Will Thames (@willthames) diff --git a/docs/amazon.aws.ec2_vpc_subnet_info_module.rst b/docs/amazon.aws.ec2_vpc_subnet_info_module.rst deleted file mode 100644 index 4375c2e4cd5..00000000000 --- a/docs/amazon.aws.ec2_vpc_subnet_info_module.rst +++ /dev/null @@ -1,612 +0,0 @@ -.. _amazon.aws.ec2_vpc_subnet_info_module: - - -****************************** -amazon.aws.ec2_vpc_subnet_info -****************************** - -**Gather information about ec2 VPC subnets in AWS** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Gather information about ec2 VPC subnets in AWS - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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 communication with the AWS APIs.
-
-
- - -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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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) diff --git a/docs/amazon.aws.ec2_vpc_subnet_module.rst b/docs/amazon.aws.ec2_vpc_subnet_module.rst deleted file mode 100644 index dba083a233d..00000000000 --- a/docs/amazon.aws.ec2_vpc_subnet_module.rst +++ /dev/null @@ -1,800 +0,0 @@ -.. _amazon.aws.ec2_vpc_subnet_module: - - -************************* -amazon.aws.ec2_vpc_subnet -************************* - -**Manage subnets in AWS virtual private clouds** - - -Version added: 1.0.0 - -.. 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. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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 -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, 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 communication with the AWS APIs.
-
-
- 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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) diff --git a/docs/amazon.aws.elb_classic_lb_module.rst b/docs/amazon.aws.elb_classic_lb_module.rst deleted file mode 100644 index 320c8927129..00000000000 --- a/docs/amazon.aws.elb_classic_lb_module.rst +++ /dev/null @@ -1,1897 +0,0 @@ -.. _amazon.aws.elb_classic_lb_module: - - -************************* -amazon.aws.elb_classic_lb -************************* - -**creates, updates or destroys an Amazon ELB.** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Creates, updates or destroys an Amazon Elastic Load Balancer (ELB). -- This module was renamed from ``amazon.aws.ec2_elb_lb`` to :ref:`amazon.aws.elb_classic_lb ` in version 2.1.0 of the amazon.aws collection. - - - -Requirements ------------- -The below requirements are needed on the host that executes this module. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- access_logs - -
- dictionary -
-
- -
A dictionary of access logs configuration settings (see examples).
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to True will configure delivery of access logs to an S3 bucket.
-
When set to False will disable delivery of access logs.
-
-
- interval - -
- integer -
-
-
    Choices: -
  • 5
  • -
  • 60 ←
  • -
-
-
The interval for publishing the access logs to S3.
-
-
- s3_location - -
- string -
-
- -
The S3 bucket to deliver access logs to.
-
See https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html for more information about the necessary S3 bucket policies.
-
Required when enabled=True.
-
-
- s3_prefix - -
- string -
-
- Default:
""
-
-
Where in the S3 bucket to deliver the logs.
-
If the prefix is not provided or set to "", the log is placed at the root level of the bucket.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_secret_key, secret_key
-
-
- connection_draining_timeout - -
- integer -
-
- -
Wait a specified timeout allowing connections to drain before terminating an instance.
-
Set to 0 to disable connection draining.
-
-
- cross_az_load_balancing - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Distribute load across all configured Availability Zones.
-
Defaults to false.
-
-
- 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- health_check - -
- dictionary -
-
- -
A dictionary of health check configuration settings (see examples).
-
-
- healthy_threshold - -
- integer - / required -
-
- -
The number of consecutive health checks successes required before moving the instance to the Healthy state.
-
-
- interval - -
- integer - / required -
-
- -
The approximate interval, in seconds, between health checks of an individual instance.
-
-
- ping_path - -
- string -
-
- -
The URI path which the ELB health check will query when performing a health check.
-
Required when ping_protocol=HTTP or ping_protocol=HTTPS.
-
-
- ping_port - -
- integer - / required -
-
- -
The TCP port to which the ELB will connect when performing a health check.
-
-
- ping_protocol - -
- string - / required -
-
- -
The protocol which the ELB health check will use when performing a health check.
-
Valid values are 'HTTP', 'HTTPS', 'TCP' and 'SSL'.
-
-
- timeout - -
- integer - / required -
-
- -
The amount of time, in seconds, after which no response means a failed health check.
-

aliases: response_timeout
-
-
- unhealthy_threshold - -
- integer - / required -
-
- -
The number of consecutive health check failures required before moving the instance to the Unhealthy state.
-
-
- idle_timeout - -
- integer -
-
- -
ELB connections from clients and to servers are timed out after this amount of time.
-
-
- instance_ids - -
- list - / elements=string -
-
- -
List of instance ids to attach to this ELB.
-
-
- listeners - -
- list - / elements=dictionary -
-
- -
List of ports/protocols for this ELB to listen on (see examples).
-
Required when state=present and the ELB doesn't exist.
-
-
- instance_port - -
- integer - / required -
-
- -
The port on which the instance is listening.
-
-
- instance_protocol - -
- string -
-
- -
The protocol to use for routing traffic to instances.
-
Valid values are HTTP, HTTPS, TCP, or SSL,
-
-
- load_balancer_port - -
- integer - / required -
-
- -
The port on which the load balancer will listen.
-
-
- protocol - -
- string - / required -
-
- -
The transport protocol to use for routing.
-
Valid values are HTTP, HTTPS, TCP, or SSL.
-
-
- proxy_protocol - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes
  • -
-
-
Enable proxy protocol for the listener.
-
Beware, ELB controls for the proxy protocol are based on the instance_port. If you have multiple listeners talking to the same instance_port, this will affect all of them.
-
-
- ssl_certificate_id - -
- string -
-
- -
The Amazon Resource Name (ARN) of the SSL certificate.
-
-
- name - -
- string - / required -
-
- -
The name of the ELB.
-
The name of an ELB must be less than 32 characters and unique per-region per-account.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- 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 subnets on the ELB that are not found in subnets.
-
Because it is not permitted to add multiple subnets from the same availability zone, subnets to be purged will be removed before new subnets are added. This may cause a brief outage if you try to replace all subnets at once.
-
-
- purge_tags - -
- boolean -
-
added in 2.1.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether to remove existing tags that aren't passed in the tags parameter.
-
-
- 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 a new ELB created.
-
Defaults to scheme=internet-facing.
-
-
- security_group_ids - -
- list - / elements=string -
-
- -
A list of security groups to apply to the ELB.
-
-
- security_group_names - -
- list - / elements=string -
-
- -
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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- state - -
- string - / required -
-
-
    Choices: -
  • absent
  • -
  • present
  • -
-
-
Create or destroy the ELB.
-
-
- stickiness - -
- dictionary -
-
- -
A dictionary of stickiness policy settings.
-
Policy will be applied to all listeners (see examples).
-
-
- cookie - -
- string -
-
- -
The name of the application cookie used for stickiness.
-
Required if enabled=true and type=application.
-
Ignored if enabled=false.
-
-
- enabled - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When enabled=false session stickiness will be disabled for all listeners.
-
-
- expiration - -
- integer -
-
- -
The time period, in seconds, after which the cookie should be considered stale.
-
If this parameter is not specified, the stickiness session lasts for the duration of the browser session.
-
Ignored if enabled=false.
-
-
- type - -
- string -
-
-
    Choices: -
  • application
  • -
  • loadbalancer
  • -
-
-
The type of stickiness policy to apply.
-
Required if enabled=true.
-
Ignored if enabled=false.
-
-
- subnets - -
- list - / elements=string -
-
- -
A list of VPC subnets to use when creating the ELB.
-
Mutually exclusive with zones.
-
-
- tags - -
- dictionary -
-
- -
A dictionary of tags to apply to the ELB.
-
To delete all tags supply an empty dict ({}) and set purge_tags=true.
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- wait - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
When creating, deleting, or adding instances to an ELB, if wait=true Ansible will wait for both the load balancer and related network interfaces to finish creating/deleting.
-
Support for waiting when adding instances was added in release 2.1.0.
-
-
- wait_timeout - -
- integer -
-
- Default:
180
-
-
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 - / elements=string -
-
- -
List of availability zones to enable on this ELB.
-
Mutually exclusive with subnets.
-
-
- - -Notes ------ - -.. note:: - - The ec2_elb fact currently set by this module has been deprecated and will no longer be set after release 4.0.0 of the collection. - - 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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.elb_classic_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.elb_classic_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.elb_classic_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.elb_classic_lb: - name: "test-please-delete" - state: absent - - # Ensure ELB is gone and wait for check (for default timeout) - - amazon.aws.elb_classic_lb: - name: "test-please-delete" - state: absent - wait: yes - - # Ensure ELB is gone and wait for check with timeout value - - amazon.aws.elb_classic_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.elb_classic_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.elb_classic_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.elb_classic_lb: - state: present - name: 'New ELB' - security_group_ids: 'sg-123456, sg-67890' - 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.elb_classic_lb: - name: "New ELB" - state: present - connection_draining_timeout: 60 - idle_timeout: 300 - cross_az_load_balancing: "yes" - 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.elb_classic_lb: - name: "New ELB" - state: present - 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.elb_classic_lb: - name: "New ELB" - state: present - 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.elb_classic_lb: - name: "New ELB" - state: present - 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.elb_classic_lb: - name: "New ELB" - state: present - zones: - - us-east-1a - - us-east-1d - listeners: - - protocol: http - load_balancer_port: 80 - instance_port: 80 - tags: {} - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- elb - -
- dictionary -
-
always -
Load Balancer attributes
-
-
  -
- app_cookie_policy - -
- string -
-
when state is not 'absent' -
The name of the policy used to control if the ELB is using a application cookie stickiness policy.
-
-
Sample:
-
ec2-elb-lb-AppCookieStickinessPolicyType
-
  -
- backends - -
- string -
-
when state is not 'absent' -
A description of the backend policy applied to the ELB (instance-port:policy-name).
-
-
Sample:
-
8181:ProxyProtocol-policy
-
  -
- connection_draining_timeout - -
- integer -
-
when state is not 'absent' -
The maximum time, in seconds, to keep the existing connections open before deregistering the instances.
-
-
Sample:
-
25
-
  -
- cross_az_load_balancing - -
- string -
-
when state is not 'absent' -
Either 'yes' if cross-AZ load balancing is enabled, or 'no' if cross-AZ load balancing is disabled.
-
-
Sample:
-
yes
-
  -
- dns_name - -
- string -
-
when state is not 'absent' -
The DNS name of the ELB.
-
-
Sample:
-
internal-ansible-test-935c585850ac-1516306744.us-east-1.elb.amazonaws.com
-
  -
- health_check - -
- dictionary -
-
when state is not 'absent' -
A dictionary describing the health check used for the ELB.
-
-
   -
- healthy_threshold - -
- integer -
-
-
The number of consecutive successful health checks before marking an instance as healthy.
-
-
Sample:
-
2
-
   -
- interval - -
- integer -
-
-
The time, in seconds, between each health check.
-
-
Sample:
-
10
-
   -
- target - -
- string -
-
-
The Protocol, Port, and for HTTP(S) health checks the path tested by the health check.
-
-
Sample:
-
TCP:22
-
   -
- timeout - -
- integer -
-
-
The time, in seconds, after which an in progress health check is considered failed due to a timeout.
-
-
Sample:
-
5
-
   -
- unhealthy_threshold - -
- integer -
-
-
The number of consecutive failed health checks before marking an instance as unhealthy.
-
-
Sample:
-
2
-
  -
- hosted_zone_id - -
- string -
-
when state is not 'absent' -
The ID of the Amazon Route 53 hosted zone for the load balancer.
-
-
Sample:
-
Z35SXDOTRQ7X7K
-
  -
- hosted_zone_name - -
- string -
-
when state is not 'absent' -
The DNS name of the load balancer when using a custom hostname.
-
-
Sample:
-
ansible-module.example
-
  -
- idle_timeout - -
- integer -
-
when state is not 'absent' -
The length of of time before an idle connection is dropped by the ELB.
-
-
Sample:
-
50
-
  -
- in_service_count - -
- integer -
-
when state is not 'absent' -
The number of instances attached to the ELB in an in-service state.
-
-
Sample:
-
1
-
  -
- instance_health - -
- list - / elements=dictionary -
-
when state is not 'absent' -
A list of dictionaries describing the health of each instance attached to the ELB.
-
-
   -
- description - -
- string -
-
when state is not 'absent' -
A human readable description of why the instance is not in service.
-
-
Sample:
-
N/A
-
   -
- instance_id - -
- string -
-
when state is not 'absent' -
The ID of the instance.
-
-
Sample:
-
i-03dcc8953a03d6435
-
   -
- reason_code - -
- string -
-
when state is not 'absent' -
A code describing why the instance is not in service.
-
-
Sample:
-
N/A
-
   -
- state - -
- string -
-
when state is not 'absent' -
The current service state of the instance.
-
-
Sample:
-
InService
-
  -
- instances - -
- list - / elements=string -
-
when state is not 'absent' -
A list of the IDs of instances attached to the ELB.
-
-
Sample:
-
['i-03dcc8953a03d6435']
-
  -
- lb_cookie_policy - -
- string -
-
when state is not 'absent' -
The name of the policy used to control if the ELB is using a cookie stickiness policy.
-
-
Sample:
-
ec2-elb-lb-LBCookieStickinessPolicyType
-
  -
- listeners - -
- list - / elements=list -
-
when state is not 'absent' -
A list of lists describing the listeners attached to the ELB.
-
The nested list contains the listener port, the instance port, the listener protoco, the instance port, and where appropriate the ID of the SSL certificate for the port.
-
-
Sample:
-
[[22, 22, 'TCP', 'TCP'], [80, 8181, 'HTTP', 'HTTP']]
-
  -
- name - -
- string -
-
when state is not 'absent' -
The name of the ELB. This name is unique per-region, per-account.
-
-
Sample:
-
ansible-test-935c585850ac
-
  -
- out_of_service_count - -
- integer -
-
when state is not 'absent' -
The number of instances attached to the ELB in an out-of-service state.
-
-
  -
- proxy_policy - -
- string -
-
when the proxy protocol policy exists. -
The name of the policy used to control if the ELB operates using the Proxy protocol.
-
-
Sample:
-
ProxyProtocol-policy
-
  -
- region - -
- string -
-
always -
The AWS region in which the ELB is running.
-
-
Sample:
-
us-east-1
-
  -
- scheme - -
- string -
-
when state is not 'absent' -
Whether the ELB is an 'internal' or a 'internet-facing' load balancer.
-
-
Sample:
-
internal
-
  -
- security_group_ids - -
- list - / elements=string -
-
when state is not 'absent' -
A list of the IDs of the Security Groups attached to the ELB.
-
-
Sample:
-
['sg-0c12ebd82f2fb97dc', 'sg-01ec7378d0c7342e6']
-
  -
- status - -
- string -
-
always -
A minimal description of the current state of the ELB. Valid values are 'exists', 'gone', 'deleted', 'created'.
-
-
Sample:
-
exists
-
  -
- subnets - -
- list - / elements=string -
-
when state is not 'absent' -
A list of the subnet IDs attached to the ELB.
-
-
Sample:
-
['subnet-00d9d0f70c7e5f63c', 'subnet-03fa5253586b2d2d5']
-
  -
- tags - -
- dictionary -
-
when state is not 'absent' -
A dictionary describing the tags attached to the ELB.
-
-
Sample:
-
{'Name': 'ansible-test-935c585850ac', 'ExampleTag': 'Example Value'}
-
  -
- unknown_instance_state_count - -
- integer -
-
when state is not 'absent' -
The number of instances attached to the ELB in an unknown state.
-
-
  -
- zones - -
- list - / elements=string -
-
when state is not 'absent' -
A list of the AWS regions in which the ELB is running.
-
-
Sample:
-
['us-east-1b', 'us-east-1a']
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Jim Dalton (@jsdalton) -- Mark Chappell (@tremble) diff --git a/docs/amazon.aws.s3_bucket_module.rst b/docs/amazon.aws.s3_bucket_module.rst deleted file mode 100644 index e5a03a01afa..00000000000 --- a/docs/amazon.aws.s3_bucket_module.rst +++ /dev/null @@ -1,917 +0,0 @@ -.. _amazon.aws.s3_bucket_module: - - -******************** -amazon.aws.s3_bucket -******************** - -**Manage S3 buckets in AWS, DigitalOcean, Ceph, Walrus, FakeS3 and StorageGRID** - - -Version added: 1.0.0 - -.. 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. - -- python >= 3.6 -- boto3 >= 1.16.0 -- botocore >= 1.19.0 - - -Parameters ----------- - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ParameterChoices/DefaultsComments
-
- acl - -
- string -
-
added in 3.1.0
-
-
    Choices: -
  • private
  • -
  • public-read
  • -
  • public-read-write
  • -
  • authenticated-read
  • -
-
-
The canned ACL to apply to the bucket.
-
If your bucket uses the bucket owner enforced setting for S3 Object Ownership, ACLs are disabled and no longer affect permissions.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_access_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

aliases: ec2_access_key, access_key
-
-
- aws_ca_bundle - -
- path -
-
- -
The location of a CA Bundle to use when validating SSL certificates.
-
Not used by boto 2 based modules.
-
Note: The CA Bundle is read 'module' side and may need to be explicitly copied from the controller if not run locally.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the aws_secret_key and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-

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.
-
-
- delete_object_ownership - -
- boolean -
-
added in 2.0.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Delete bucket's ownership controls.
-
This option cannot be used together with a object_ownership definition.
-
-
- delete_public_access - -
- boolean -
-
added in 1.3.0
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Delete public access block configuration from bucket.
-
This option cannot be used together with a public_access definition.
-
-
- 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.
-

aliases: aws_endpoint_url, endpoint_url
-
-
- 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.
-
-
- object_ownership - -
- string -
-
added in 2.0.0
-
-
    Choices: -
  • BucketOwnerEnforced
  • -
  • BucketOwnerPreferred
  • -
  • ObjectWriter
  • -
-
-
Allow bucket's ownership controls.
-
BucketOwnerEnforced - ACLs are disabled and no longer affect access permissions to your bucket. Requests to set or update ACLs fail. However, requests to read ACLs are supported. Bucket owner has full ownership and control. Object writer no longer has full ownership and control.
-
BucketOwnerPreferred - Objects uploaded to the bucket change ownership to the bucket owner if the objects are uploaded with the bucket-owner-full-control canned ACL.
-
ObjectWriter - The uploading account will own the object if the object is uploaded with the bucket-owner-full-control canned ACL.
-
This option cannot be used together with a delete_object_ownership definition.
-
BucketOwnerEnforced has been added in version 3.2.0.
-
-
- policy - -
- json -
-
- -
The JSON policy as a string. Set to the string "null" to force the absence of a policy.
-
-
- profile - -
- string -
-
- -
Using profile will override aws_access_key, aws_secret_key and security_token and support for passing them at the same time as profile has been deprecated.
-
aws_access_key, aws_secret_key and security_token will be made mutually exclusive with profile after 2022-06-01.
-

aliases: aws_profile
-
-
- public_access - -
- dictionary -
-
added in 1.3.0
-
- -
Configure public access block for S3 bucket.
-
This option cannot be used together with delete_public_access.
-
-
- block_public_acls - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Sets BlockPublicAcls value.
-
-
- block_public_policy - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Sets BlockPublicPolicy value.
-
-
- ignore_public_acls - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Sets IgnorePublicAcls value.
-
-
- restrict_public_buckets - -
- boolean -
-
-
    Choices: -
  • no ←
  • -
  • yes
  • -
-
-
Sets RestrictPublicAcls value.
-
-
- 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.
-
If profile is set this parameter is ignored.
-
Passing the security_token and profile options at the same time has been deprecated and the options will be made mutually exclusive after 2022-06-01.
-
Aliases aws_session_token and session_token have been added in version 3.2.0.
-

aliases: aws_session_token, session_token, aws_security_token, access_token
-
-
- state - -
- string -
-
-
    Choices: -
  • present ←
  • -
  • absent
  • -
-
-
Create or remove the S3 bucket.
-
-
- tags - -
- dictionary -
-
- -
Tags dict to apply to bucket.
-
-
- validate_bucket_name - -
- boolean -
-
added in 3.1.0
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
Whether the bucket name should be validated to conform to AWS S3 naming rules.
-
On by default, this may be disabled for S3 backends that do not enforce these rules.
-
See https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html
-
-
- validate_certs - -
- boolean -
-
-
    Choices: -
  • no
  • -
  • yes ←
  • -
-
-
When set to "no", SSL certificates will not be validated for communication with the AWS APIs.
-
-
- 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_PROFILE`` or ``AWS_DEFAULT_PROFILE``, ``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``, ``AWS_CA_BUNDLE`` - - When no credentials are explicitly provided the AWS SDK (boto3) that Ansible uses will fall back to its configuration files (typically ``~/.aws/credentials``). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information. - - Modules based on the original AWS SDK (boto) may read their default configuration from different files. See https://boto.readthedocs.io/en/latest/boto_config_tut.html for more information. - - ``AWS_REGION`` or ``EC2_REGION`` can be typically be used to specify the AWS region, when required, but this can also be defined in the configuration files. - - - -Examples --------- - -.. code-block:: yaml - - # 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" - - # Create a bucket with public policy block configuration - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - public_access: - block_public_acls: true - ignore_public_acls: true - ## keys == 'false' can be omitted, undefined keys defaults to 'false' - # block_public_policy: false - # restrict_public_buckets: false - - # Delete public policy block from bucket - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - delete_public_access: true - - # Create a bucket with object ownership controls set to ObjectWriter - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - object_ownership: ObjectWriter - - # Delete onwership controls from bucket - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - delete_object_ownership: true - - # Delete a bucket policy from bucket - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - policy: "null" - - # This example grants public-read to everyone on bucket using ACL - - amazon.aws.s3_bucket: - name: mys3bucket - state: present - acl: public-read - - - -Return Values -------------- -Common return values are documented `here `_, the following are the fields unique to this module: - -.. raw:: html - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
KeyReturnedDescription
-
- acl - -
- dictionary -
-
state=present -
S3 bucket's canned ACL.
-
-
Sample:
-
public-read
-
-
- encryption - -
- string -
-
state=present -
Server-side encryption of the objects in the S3 bucket.
-
-
-
- name - -
- string -
-
state=present -
Name of the S3 bucket.
-
-
Sample:
-
2d3ce10a8210d36d6b4d23b822892074complex
-
-
- object_ownership - -
- string -
-
state=present -
S3 bucket's ownership controls.
-
-
Sample:
-
BucketOwnerPreferred
-
-
- policy - -
- dictionary -
-
state=present -
S3 bucket's policy.
-
-
Sample:
-
{'Statement': [{'Action': 's3:GetObject', 'Effect': 'Allow', 'Principal': '*', 'Resource': 'arn:aws:s3:::2d3ce10a8210d36d6b4d23b822892074complex/*', 'Sid': 'AddPerm'}], 'Version': '2012-10-17'}
-
-
- requester_pays - -
- string -
-
state=present -
Indicates that the requester was successfully charged for the request.
-
-
-
- tags - -
- dictionary -
-
state=present -
S3 bucket's tags.
-
-
Sample:
-
{'Tag1': 'tag1', 'Tag2': 'tag2'}
-
-
- versioning - -
- dictionary -
-
state=present -
S3 bucket's versioning configuration.
-
-
Sample:
-
{'MfaDelete': 'Disabled', 'Versioning': 'Enabled'}
-
-

- - -Status ------- - - -Authors -~~~~~~~ - -- Rob White (@wimnat) -- Aubin Bikouo (@abikouo) diff --git a/docs/docsite/links.yml b/docs/docsite/links.yml new file mode 100644 index 00000000000..ce667b36753 --- /dev/null +++ b/docs/docsite/links.yml @@ -0,0 +1,41 @@ +--- +# based on https://github.com/ansible-collections/collection_template/blob/main/docs/docsite/links.yml +# +# This will make sure that plugin and module documentation gets Edit on GitHub links +# that allow users to directly create a PR for this plugin or module in GitHub's UI. +# Remove this section if the collection repository is not on GitHub, or if you do not want this +# functionality for your collection. +edit_on_github: + repository: ansible-collections/amazon.aws + branch: main + # If your collection root (the directory containing galaxy.yml) does not coincide with your + # repository's root, you have to specify the path to the collection root here. For example, + # if the collection root is in a subdirectory ansible_collections/community/REPO_NAME + # in your repository, you have to set path_prefix to 'ansible_collections/community/REPO_NAME'. + path_prefix: '' + +# Here you can add arbitrary extra links. Please keep the number of links down to a +# minimum! Also please keep the description short, since this will be the text put on +# a button. +# +# Also note that some links are automatically added from information in galaxy.yml. +# The following are automatically added: +# 1. A link to the issue tracker (if `issues` is specified); +# 2. A link to the homepage (if `homepage` is specified and does not equal the +# `documentation` or `repository` link); +# 3. A link to the collection's repository (if `repository` is specified). + +# extra_links: +# - description: +# url: + +# Specify communication channels for your collection. We suggest to not specify more +# than one place for communication per communication tool to avoid confusion. +communication: + matrix_rooms: + - topic: General usage and support questions + room: '#aws:ansible.im' + irc_channels: + - topic: General usage and support questions + network: Libera + channel: '#ansible-aws'