Note
This filter plugin is part of the community.crypto collection (version 2.26.5).
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
This describes the input of the filter, the value before | community.crypto.openssl_publickey_info.
Parameter | Comments |
|---|---|
Input string / required | The content of the OpenSSL PEM public key. |
See also
Provide information for OpenSSL public keys.
---
- 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
}}
Key | Description |
|---|---|
Return value dictionary | Information on the public key. Returned: success |
|
fingerprints dictionary |
Fingerprints of public key. For every hash algorithm available, the fingerprint is computed. Returned: success Sample: |
|
public_data dictionary |
Public key data. Depends on key type. Returned: success |
|
curve string |
The curve’s name for ECC. Returned: When |
|
exponent integer |
The RSA key’s public exponent. Returned: When |
|
exponent_size integer |
The maximum number of bits of a private key. This is basically the bit size of the subgroup used. Returned: When |
|
g integer |
The This is the element spanning the subgroup of the multiplicative group of the prime field used. Returned: When |
|
modulus integer |
The RSA key’s modulus. Returned: When |
|
p integer |
The This is the prime modulus upon which arithmetic takes place. Returned: When |
|
q integer |
The This is a prime that divides Returned: When |
|
size integer |
Bit size of modulus (RSA) or prime number (DSA). Returned: When |
|
x integer |
The Returned: When |
|
y integer |
For For Returned: When |
|
type string |
The key’s type. One of Will start with Returned: success Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/community/crypto/openssl_publickey_info_filter.html