community.crypto.openssl_publickey_info filter – Retrieve information from OpenSSL public keys in PEM format
Note
This filter plugin is part of the community.crypto collection (version 2.21.1).
You might already have this collection installed if you are using the ansible
package.
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 community.crypto
.
To use it in a playbook, specify: community.crypto.openssl_publickey_info
.
New in community.crypto 2.10.0
Synopsis
Provided a public key in OpenSSL PEM format, retrieve information.
This is a filter version of the community.crypto.openssl_publickey_info module.
Input
This describes the input of the filter, the value before | community.crypto.openssl_publickey_info
.
Parameter |
Comments |
---|---|
The content of the OpenSSL PEM public key. |
See Also
See also
- community.crypto.openssl_publickey_info
Provide information for OpenSSL public keys.
Examples
- name: Show the type of a public key
ansible.builtin.debug:
msg: >-
{{
(
lookup('ansible.builtin.file', '/path/to/public-key.pem')
| community.crypto.openssl_publickey_info
).type
}}
Return Value
Key |
Description |
---|---|
Information on the public key. Returned: success |
|
Fingerprints of public key. For every hash algorithm available, the fingerprint is computed. Returned: success Sample: |
|
Public key data. Depends on key type. Returned: success |
|
The curve’s name for ECC. Returned: When |
|
The RSA key’s public exponent. Returned: When |
|
The maximum number of bits of a private key. This is basically the bit size of the subgroup used. Returned: When |
|
The This is the element spanning the subgroup of the multiplicative group of the prime field used. Returned: When |
|
The RSA key’s modulus. Returned: When |
|
The This is the prime modulus upon which arithmetic takes place. Returned: When |
|
The This is a prime that divides Returned: When |
|
Bit size of modulus (RSA) or prime number (DSA). Returned: When |
|
The Returned: When |
|
For For Returned: When |
|
The key’s type. One of Will start with Returned: success Sample: |