Current Dir: /snap/core22/2955/usr/lib/python3/dist-packages/cloudinit/config/__pycache__/

[FILE] cc_ansible.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_apk_configure.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_apt_configure.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_apt_pipelining.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_bootcmd.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_byobu.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_ca_certs.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_chef.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_disable_ec2_metadata.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_disk_setup.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_fan.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_final_message.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_growpart.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_grub_dpkg.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_install_hotplug.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_keyboard.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_keys_to_console.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_landscape.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_locale.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_lxd.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_mcollective.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_mounts.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_ntp.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_package_update_upgrade_install.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_phone_home.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_power_state_change.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_puppet.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_raspberry_pi.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_reset_rmc.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_resizefs.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_resolv_conf.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_rh_subscription.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_rsyslog.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_runcmd.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_salt_minion.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_scripts_per_boot.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_scripts_per_instance.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_scripts_per_once.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_scripts_user.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_scripts_vendor.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_seed_random.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_set_hostname.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_set_passwords.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_snap.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_spacewalk.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_ssh.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_ssh_authkey_fingerprints.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_ssh_import_id.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_timezone.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_ubuntu_autoinstall.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_ubuntu_drivers.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_ubuntu_pro.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_update_etc_hosts.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_update_hostname.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_users_groups.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_wireguard.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_write_files.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_write_files_deferred.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_yum_add_repo.cpython-310.pyc [ edit | delete | rename ]
[FILE] cc_zypper_add_repo.cpython-310.pyc [ edit | delete | rename ]
[FILE] modules.cpython-310.pyc [ edit | delete | rename ]
[FILE] schema.cpython-310.pyc [ edit | delete | rename ]
[FILE] __init__.cpython-310.pyc [ edit | delete | rename ]

Viewing: /snap/core22/2955/usr/lib/python3/dist-packages/cloudinit/config/__pycache__/cc_ssh_import_id.cpython-310.pyc

o

��i��
@s�UdZddlZddlZddlmZmZddlmZddlm	Z	ddl
mZddlm
Z
ddlmZd	Zd
gd�egd�Zeed
<e�e�Zdede	dededdf
dd�Zdd�Zdededefdd�ZdS)zSSH Import ID: Import SSH id�N)�subp�util)�Cloud)�Config)�
MetaSchema)�ug_util)�PER_INSTANCEz
ssh-import-id�cc_ssh_import_id)�alpine�cos�debianzraspberry-pi-os�ubuntu)�id�distros�	frequency�activate_by_schema_keys�meta�name�cfg�cloud�args�returncCs|t|d�st�d�dSt�t�st�d�dS|r3|d}g}t|�dkr,|dd�}t||�dSt	�
||j�\}}g}|��D]q\}}	g}
|	drTt
�|dg�}
nz|	d}
Wntyit�d|�YqBwzt
�|
�}
dd	�|
D�}
Wnty�t�d
|�YqBwt|
�s�qBzt|
|�WqBty�}zt
�td||
�|�|�WYd}~qBd}~wwt|�r�|d�dS)N�
ssh_import_idzISkipping module named ssh_import_id, no 'ssh_import_id' directives found.zXssh-import-id is not installed, but module ssh_import_id is configured. Skipping module.r��defaultz+User %s is not configured for ssh_import_idcSsg|]}t|��qS�)�str)�.0�irr�C/usr/lib/python3/dist-packages/cloudinit/config/cc_ssh_import_id.py�
<listcomp>Kszhandle.<locals>.<listcomp>z5User %s is not correctly configured for ssh_import_idzssh-import-id failed for: %s %s)�is_key_in_nested_dict�LOG�debugr�which�SSH_IMPORT_ID_BINARY�warning�len�import_ssh_idsr�normalize_users_groups�distro�itemsr�get_cfg_option_list�	Exception�
uniq_merge�logexc�append)rrrr�user�ids�users�_groups�elist�user_cfg�
import_ids�excrrr�handle"sh
�
�
�
������r9c
Cs�|r|s
t�d||�dSzt�|�Wnty"}z|�d}~wwt�d�r2ddd|tg|}nt�d�r@dd|tg|}nt�d�dSt�d|�z
tj|d	d
�WdStj	ym}z	t
�td|�|�d}~ww)Nz(empty user(%s) or ids(%s). not importing�sudoz--preserve-env=https_proxyz-Hu�doasz-uz:Neither sudo nor doas available! Unable to import SSH ids.zImporting SSH ids for user %s.F)�capturez*Failed to run command to import %s SSH ids)r"r#�pwd�getpwnam�KeyErrorrr$r%�error�ProcessExecutionErrorrr/)r2r1r8�cmdrrrr(asH��
��
��
��r(�config�
search_keycCsz|��D]6}||kr
dSt||t�rt|||�rdSt||t�r:||D]}t|t�r9t||�r9dSq)qdS)z�Search for key nested in config.

    Note: A dict embedded in a list of lists will not be found walked - but in
    this case we don't need it.
    TF)�keys�
isinstance�dictr!�list)rCrD�
config_key�itemrrrr!�s

�r!)�__doc__�loggingr=�	cloudinitrr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemar�cloudinit.distrosr�cloudinit.settingsrr%r�__annotations__�	getLogger�__name__r"rrHr9r(rG�boolr!rrrr�<module>s&�
??
Upload File: