
    VhF                     ~    d dl mZmZmZ eZdZdZdZd dl	m
Z
 d dlmZ d dlmZ d dlmZmZ d d	lmZ  G d
 de      Zy)    )absolute_importdivisionprint_functiona2  
name: gpg_fingerprint
short_description: Retrieve a GPG fingerprint from a GPG public or private key file
author: Felix Fontein (@felixfontein)
version_added: 2.15.0
description:
  - Takes a list of filenames pointing to GPG public or private key files. Returns the fingerprints for each of these keys.
options:
  _terms:
    description:
      - A path to a GPG public or private key.
    type: list
    elements: path
    required: true
requirements:
  - GnuPG (C(gpg) executable)
seealso:
  - plugin: community.crypto.gpg_fingerprint
    plugin_type: filter
z
---
- name: Show fingerprint of GPG public key
  ansible.builtin.debug:
    msg: "{{ lookup('community.crypto.gpg_fingerprint', '/path/to/public_key.gpg') }}"
z
_value:
  description:
    - The fingerprints of the provided public or private GPG keys.
    - The list has one entry for every path provided.
  type: list
  elements: string
)AnsibleLookupError)	to_native)
LookupBase)GPGErrorget_fingerprint_from_file)PluginGPGRunnerc                       e Zd ZddZy)LookupModuleNc                    | j                  |       	 t        | j                  j                               }g }|D ]  }|j	                  t        ||              |S # t        $ r}t        t        |            d }~ww xY w)N)direct)cwd)	set_optionsr   _loaderget_basedirappendr
   r	   r   r   )selfterms	variableskwargsgpgresultpathexcs           s/home/dcms/DCMS/lib/python3.12/site-packages/ansible_collections/community/crypto/plugins/lookup/gpg_fingerprint.pyrunzLookupModule.run=   s}    '	5!dll&>&>&@ACF D7TBCDM 	5$Ys^44	5s   A	A 	B 'A;;B )N)__name__
__module____qualname__r        r   r   r   <   s    
5r#   r   N)
__future__r   r   r   type__metaclass__DOCUMENTATIONEXAMPLESRETURNansible.errorsr   +ansible.module_utils.common.text.convertersr   ansible.plugins.lookupr   Cansible_collections.community.crypto.plugins.module_utils.gnupg.clir	   r
   ?ansible_collections.community.crypto.plugins.plugin_utils.gnupgr   r   r"   r#   r   <module>r/      sK    A @ *
 . A -
5: 5r#   