community.crypto.gpg_fingerprint filter – Retrieve a GPG fingerprint from a GPG public or private key

Note

This filter 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 filter 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 the content of a private or public GPG key as input and returns its fingerprint.

Requirements

The below requirements are needed on the local controller node that executes this filter.

  • GnuPG (gpg executable)

Input

This describes the input of the filter, the value before | community.crypto.gpg_fingerprint.

Parameter

Comments

Input

string / required

The content of a GPG public or private key.

See Also

See also

community.crypto.gpg_fingerprint lookup plugin

Retrieve a GPG fingerprint from a GPG public or private key file.

Examples

- name: Show fingerprint of GPG public key
  ansible.builtin.debug:
    msg: "{{ lookup('file', '/path/to/public_key.gpg') | community.crypto.gpg_fingerprint }}"

Return Value

Key

Description

Return value

string

The fingerprint of the provided public or private GPG key.

Returned: success

Authors

  • Felix Fontein (@felixfontein)

Hint

Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up.