amazon.aws.route53_key_signing_key module – Manages a key-signing key (KSK)
Note
This module is part of the amazon.aws collection (version 10.0.0-dev0).
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install amazon.aws
.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: amazon.aws.route53_key_signing_key
.
New in amazon.aws 9.2.0
Synopsis
Creates a new key-signing key (KSK) associated with a hosted zone. You can only have two KSKs per hosted zone.
When
state=absent
, it deactivates and deletes a key-signing key (KSK).Activates a key-signing key (KSK) so that it can be used for signing by DNSSEC.
Deactivates a key-signing key (KSK) so that it will not be used for signing by DNSSEC.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.6
boto3 >= 1.34.0
botocore >= 1.34.0
Parameters
Parameter |
Comments |
---|---|
AWS access key ID. See the AWS documentation for more information about access tokens https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys. The The aws_access_key and profile options are mutually exclusive. The aws_access_key_id alias was added in release 5.1.0 for consistency with the AWS botocore SDK. |
|
The location of a CA Bundle to use when validating SSL certificates. The |
|
A dictionary to modify the botocore configuration. Parameters can be found in the AWS documentation https://botocore.amazonaws.com/v1/documentation/api/latest/reference/config.html#botocore.config.Config. |
|
A unique string that identifies the request. Required when |
|
Use a The Choices:
|
|
URL to connect to instead of the default AWS endpoints. While this can be used to connection to other AWS-compatible services the amazon.aws and community.aws collections are only tested against AWS. The |
|
The unique string (ID) used to identify a hosted zone. |
|
The Amazon resource name (ARN) for a customer managed key in Key Management Service (KMS). Required when |
|
A string used to identify a key-signing key (KSK). |
|
A named AWS profile to use for authentication. See the AWS documentation for more information about named profiles https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html. The The profile option is mutually exclusive with the aws_access_key, aws_secret_key and session_token options. |
|
The AWS region to use. For global services such as IAM, Route53 and CloudFront, region is ignored. The See the Amazon AWS documentation for more information http://docs.aws.amazon.com/general/latest/gr/rande.html#ec2_region. |
|
AWS secret access key. See the AWS documentation for more information about access tokens https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys. The The secret_key and profile options are mutually exclusive. The aws_secret_access_key alias was added in release 5.1.0 for consistency with the AWS botocore SDK. |
|
AWS STS session token for use with temporary credentials. See the AWS documentation for more information about access tokens https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-secret-access-keys. The The session_token and profile options are mutually exclusive. |
|
Whether or not the zone should exist. Choices:
|
|
A string specifying the initial status of the key-signing key (KSK). When Choices:
|
|
When set to Setting validate_certs=false is strongly discouraged, as an alternative, consider setting aws_ca_bundle instead. Choices:
|
|
Wait until the changes have been replicated. Choices:
|
|
How long to wait for the changes to be replicated, in seconds. Default: |
Notes
Note
Caution: For modules, environment variables and configuration files are read from the Ansible ‘host’ context and not the ‘controller’ context. As such, files may need to be explicitly copied to the ‘host’. For lookup and connection plugins, environment variables and configuration files are read from the Ansible ‘controller’ context and not the ‘host’ context.
The AWS SDK (boto3) that Ansible uses may also read defaults for credentials and other settings, such as the region, from its configuration files in the Ansible ‘host’ context (typically
~/.aws/credentials
). See https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html for more information.
Examples
- name: Create a Key Signing Key Request
amazon.aws.route53_ksk:
name: "{{ resource_prefix }}-ksk"
hosted_zone_id: "ZZZ1111112222"
key_management_service_arn: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
caller_reference: "arn:aws:iam::123456789012:user/SomeUser"
status: "INACTIVE"
state: present
- name: Activate a Key Signing Key Request
amazon.aws.route53_ksk:
name: "{{ resource_prefix }}-ksk"
hosted_zone_id: "ZZZ1111112222"
key_management_service_arn: "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
caller_reference: "arn:aws:iam::123456789012:user/SomeUser"
status: "ACTIVE"
state: present
- name: Delete a Key Signing Key Request and deactivate it
amazon.aws.route53_ksk:
name: "{{ resource_prefix }}-ksk"
hosted_zone_id: "ZZZ1111112222"
state: absent
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
A dictionary that describes change information about changes made to the hosted zone. Returned: when a Key Signing Key is created or it exists and is updated/deleted Sample: |
|
A comment you can provide. Returned: success |
|
Change ID. Returned: success |
|
The current state of the request. Returned: success |
|
The date and time that the change request was submitted in ISO 8601 format and Coordinated Universal Time (UTC). Returned: success |
|
The key-signing key (KSK) that the request creates. Returned: always Sample: |
|
The date when the key-signing key (KSK) was created. Returned: success |
|
A string used to represent the delegation signer digest algorithm. Returned: success |
|
An integer used to represent the delegation signer digest algorithm. Returned: success |
|
A cryptographic digest of a DNSKEY resource record (RR). Returned: success |
|
A string that represents a DNSKEY record. Returned: success |
|
A string that represents a delegation signer (DS) record. Returned: success |
|
An integer that specifies how the key is used. Returned: success |
|
An integer used to identify the DNSSEC record for the domain name. Returned: success |
|
The Amazon resource name (ARN) used to identify the customer managed key in Key Management Service (KMS). Returned: success |
|
The last time that the key-signing key (KSK) was changed. Returned: success |
|
A string used to identify a key-signing key (KSK). Returned: success |
|
The public key, represented as a Base64 encoding. Returned: success |
|
A string used to represent the signing algorithm. Returned: success |
|
An integer used to represent the signing algorithm. Returned: success |
|
A string that represents the current key-signing key (KSK) status. Returned: success |
|
The status message provided for ACTION_NEEDED or INTERNAL_FAILURE statuses. Returned: success |
|
The unique URL representing the new key-signing key (KSK). Returned: when only a new Key Signing Key is created Sample: |