steampunk / steampunk.aws / 0.9.0 / module / ec2_key_pair_info List EC2 key pairs. Authors: Manca Bizjak (@mancabizjak), Aljaz Kosir (@aljazkosir), Saso Stanovnik (@sstanovnik), Miha Dolinar (@mdolinar), Tadej Borovsak (@tadeboro) preview | supported by XLAB Steampunksteampunk.aws.ec2_key_pair_info (0.9.0) — module
Install with ansible-galaxy collection install steampunk.aws:==0.9.0
collections: - name: steampunk.aws version: 0.9.0
Retrieve information about AWS EC2 key pairs.
- name: List all EC2 key pairs ec2_key_pair_info: register: result
- name: List a specific EC2 key pair ec2_key_pair_info: names: my-first-keypair register: result
- name: List information for multiple key pairs ec2_key_pair_info: names: - my-first-keypair - world-greeter register: result
auth: description: - Parameters for authenticating with the AWS service. Each of them may be defined via environment variables. suboptions: access_key: description: - The AWS access key ID. If not set, the value of the AWS_ACCESS_KEY environment variable will be checked. - Mutually exclusive with I(profile). required: false type: str profile: description: - The name of the AWS profile configured with C(aws configure). - Can be used instead of explicitly specifying your access credentials and region. - Use C(default) to use the default profile. - Mutually exclusive with I(access_key) and I(secret_key). required: false type: str region: description: - The name of the AWS region. - If not set, the value of the AWS_REGION environment variable will be checked. - If you set a I(profile) that specifies a default region, that region is used and you can omit this parameter. Use this parameter to override the profile's default region. type: str secret_key: description: - The AWS secret access key. If not set, the value of the AWS_SECRET_KEY environment variable will be checked. - Mutually exclusive with I(profile). required: false type: str url: description: - The URL to the AWS service related to the resource. By default, this is automatically determined through the region parameter. - If not set explicitly, the value of the AWS_<SERVICE>_URL environment variable will be used. - The services currently supported are EC2 and S3. required: false type: str type: dict names: default: [] description: - The names of the keypairs to retrieve. elements: str required: false type: list
objects: contains: fingerprint: description: - This keypair's fingerprint. - Note that AWS computes fingerprints in two different ways - for AWS-generated keys, fingerprints are computed with SHA1 on the _private_ keys, while for imported keys, fingerprints are computed with MD5 on the _public_ keys. returned: always type: str name: description: The name of the key pair. returned: always type: str description: - A list of objects representing EC2 key pairs. - Note that the private keys are not returned, as they are not stored by AWS EC2. returned: success sample: objects: - fingerprint: 0a:ec:24:7b:69:ce:98:63:a4:ea:3c:e6:76:bb:6c:66:90:d0:33:ae name: my-first-keypair type: list