community.crypto.gpg_fingerprint lookup – Retrieve a GPG fingerprint from a GPG public or private key file
Note
This lookup plugin is part of the community.crypto collection (version 2.16.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
.
You need further requirements to be able to use this lookup plugin,
see Requirements for details.
To use it in a playbook, specify: community.crypto.gpg_fingerprint
.
New in community.crypto 2.15.0
Synopsis
Takes a list of filenames pointing to GPG public or private key files. Returns the fingerprints for each of these keys.
Requirements
The below requirements are needed on the local controller node that executes this lookup.
GnuPG (
gpg
executable)
Terms
Parameter |
Comments |
---|---|
A path to a GPG public or private key. |
See Also
See also
- community.crypto.gpg_fingerprint filter plugin
Retrieve a GPG fingerprint from a GPG public or private key.
Examples
- name: Show fingerprint of GPG public key
ansible.builtin.debug:
msg: "{{ lookup('community.crypto.gpg_fingerprint', '/path/to/public_key.gpg') }}"
Return Value
Key |
Description |
---|---|
The fingerprints of the provided public or private GPG keys. The list has one entry for every path provided. Returned: success |