
    Vh                    V    d dl mZ d dlmc mc mZ d dlmZ d dl	m
Z
  G d de
      Zy)    )annotationsN)get_file_content)BaseFactCollectorc                  ,    e Zd ZdZ eg d      ZddZy)SshPubKeyFactCollectorssh_pub_keys)ssh_host_pub_keysssh_host_key_dsa_publicssh_host_key_rsa_publicssh_host_key_ecdsa_publicssh_host_key_ed25519_publicNc                    i }d}g d}|D ]Q  }|D ]J  }d|z  }||v r|c c S |d|d}	t        |	      }
|
(|
j                         dd \  }}|||<   |||dz   <   L S |S )	N)dsarsaecdsaed25519)z/etc/sshz/etc/opensshz/etczssh_host_key_%s_publicz
/ssh_host_z_key.pubr      _keytype)r   split)selfmodulecollected_factsssh_pub_key_factsalgoskeydirskeydiralgofactnamekey_filenamekeydatakeytypekeys                ^/home/dcms/DCMS/lib/python3.12/site-packages/ansible/module_utils/facts/system/ssh_pub_keys.pycollectzSshPubKeyFactCollector.collect!   s    2 7 	GF G3d:00 -,;A4H*<8&%,]]_Qq%9NWc25%h/?F%h&;<G	G !     )NN)__name__
__module____qualname__nameset	_fact_idsr$    r%   r#   r   r      s    D 4 5I!r%   r   )
__future__r   "ansible.module_utils.compat.typingmodule_utilscompattypingt ansible.module_utils.facts.utilsr   $ansible.module_utils.facts.collectorr   r   r,   r%   r#   <module>r5      s#     # . . = B!. !r%   