Skip to content

Latest commit

 

History

History
564 lines (524 loc) · 27.5 KB

community.missing_collection.aws_cloudhsm_info_module.rst

File metadata and controls

564 lines (524 loc) · 27.5 KB

community.missing_collection.aws_cloudhsm_info

Get details about Amazon CloudHSM.

Version added: 0.0.3

The below requirements are needed on the host that executes this module.

  • boto
  • boto3
  • botocore
  • python >= 2.6
Parameter Choices/Defaults Comments
arn
string
can be arn of hsm?
can be arn of hapg?
can be luna client certificate arn?
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.
Only used for boto3 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
certificate_fingerprint
string
luna client certificate fingerprint?
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_hapg
boolean
    Choices:
  • no
  • yes
do you want to describe high-availability partition group of arn?
describe_hsm
boolean
    Choices:
  • no
  • yes
do you want to describe hsm of arn?
describe_luna_client
boolean
    Choices:
  • no
  • yes
do you want to describe luna client of arn and certificate_fingerprint?
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
list_hapgs
boolean
    Choices:
  • no
  • yes
do you want to list all high-availability partition group?
list_hsms
boolean
    Choices:
  • no
  • yes
do you want to list all hsms?
list_luna_clients
boolean
    Choices:
  • no
  • yes
do you want to list all hsms clients?
profile
string
Uses a boto profile. Only works with boto >= 2.24.0.
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_security_token, access_token
validate_certs
boolean
    Choices:
  • no
  • yes ←
When set to "no", SSL certificates will not be validated for boto versions >= 2.6.0.

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
  • Ansible uses the boto configuration file (typically ~/.boto) if no credentials are provided. See https://boto.readthedocs.io/en/latest/boto_config_tut.html
  • AWS_REGION or EC2_REGION can be typically be used to specify the AWS region, when required, but this can also be configured in the boto config file
- name: "list available zones of cloudhsm"
  aws_cloudhsm_info:
    register: _az

- name: "Retrieves the identifiers of all of the HSMs provisioned"
  aws_cloudhsm_info:
    list_hsms: true

- name: "Lists the high-availability partition groups"
  aws_cloudhsm_info:
    list_hapgs: true

- name: "Lists all of the luna clients."
  aws_cloudhsm_info:
    list_luna_clients: true

- name: "Retrieves information about a high-availability partition group."
  aws_cloudhsm_info:
    describe_hapg: true
    arn: 'hapg_arn'

- name: "Retrieves information about an HSM."
  aws_cloudhsm_info:
    describe_hsm: true
    arn: 'cloud_hsm_arn'
    serial_number: '122344545'

- name: "Retrieves information about an HSM client."
  aws_cloudhsm_info:
    describe_luna_client: true
    arn: 'client_cert_arn'
    certificate_fingerprint: 'certificate_fingerprint'

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
az_list
list
when no argument and success
Lists the Availability Zones that have available AWS CloudHSM capacity.

Sample:
['string']
hapg
dictionary
when `describe_hapg` and `arn` are defined and success
Retrieves information about a high-availability partition group.

Sample:
{'hapg_arn': 'string', 'hapg_serial': 'string', 'hsms_last_acction_failed': [], 'hsms_pending_deletion': [], 'hsms_pending_registration': [], 'label': 'string', 'last_modified_timestamp': 'string', 'partition_serial_list': [], 'state': 'READY'}
hapg_list
list
when `list_hapgs` is defined and success
Lists the high-availability partition groups.

Sample:
['string']
hsm
dictionary
when `describe_hsm` is defined and success
Retrieves information about an HSM.

Sample:
{'hsm_arn': 'string', 'status': 'PENDING', 'status_details': 'string', 'availability_zone': 'string', 'eni_id': 'string', 'eni_ip': 'string', 'subscription_type': 'PRODUCTION', 'subscription_start_date': 'string', 'subscription_end_date': 'string', 'vpc_id': 'string', 'subnet_id': 'string', 'iam_role_arn': 'string', 'serial_number': 'string', 'vendor_name': 'string', 'hsm_type': 'string', 'software_version': 'string', 'ssh_public_key': 'string', 'ssh_key_last_updated': 'string', 'server_cert_uri': 'string', 'server_cert_last_updated': 'string', 'partitions': []}
hsm_list
list
when `list_hsms` is defined and success
Retrieves the identifiers of all of the HSMs provisioned.

Sample:
['string']
luna_client
dictionary
when `describe_luna_client` and `arn` and `certificate_fingerprint` are defined and success
Retrieves information about an HSM client.

Sample:
{'client_arn': 'string', 'certificate': 'string', 'certificate_fingerprint': 'string', 'last_modified_timestamp': 'string', 'label': 'string'}
luna_client_list
list
when `list_luna_clients` is defined and success
Lists all of the Luna clients.

Sample:
['string']


Authors