HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux ip-10-0-8-47 6.8.0-1021-aws #23~22.04.1-Ubuntu SMP Tue Dec 10 16:31:58 UTC 2024 aarch64
User: ubuntu (1000)
PHP: 8.1.2-1ubuntu2.22
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/cloudinit/config/__pycache__/cc_scripts_vendor.cpython-310.pyc
o

�Ad?	�@s�UdZddlZddlmZddlmZddlmZmZddl	m
Z
ddlmZddl
mZmZdd	lmZdd
lmZdZdd
deegeed�ed�ed�ggd�Zeed<ee�ZdZdedede
dededdfdd�ZdS)z"Scripts Vendor: Run vendor scripts�N)�Logger)�dedent)�subp�util)�Cloud)�Config)�
MetaSchema�get_meta_doc)�ALL_DISTROS)�PER_INSTANCEaiOn select Datasources, vendors have a channel for the consumption
of all supported user data types via a special channel called
vendor data. Any scripts in the ``scripts/vendor`` directory in the datasource
will be run when a new instance is first booted. Scripts will be run in
alphabetical order. This module allows control over the execution of
vendor data.
�cc_scripts_vendorzScripts VendorzRun vendor scriptszg            vendor_data:
              enabled: true
              prefix: /usr/bin/ltrace
            ze            vendor_data:
              enabled: true
              prefix: [timeout, 30]
            zr            # Vendor data will not be processed
            vendor_data:
              enabled: false
            )�id�name�title�description�distros�	frequency�examples�activate_by_schema_keys�meta�vendorr�cfg�cloud�log�args�returnc	CsXtj�|��dt�}t�|dg�}z
tj||d�WdSt	y+|�
d|t|��w)N�scripts)�vendor_data�prefix)�
exe_prefixz"Failed to run module %s (%s in %s))�os�path�join�
get_ipath_cur�
SCRIPT_SUBDIRr�get_cfg_by_pathr�runparts�	Exception�warning)rrrrr�
runparts_pathr�r*�D/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_vendor.py�handleCs
���r,)�__doc__r �loggingr�textwrapr�	cloudinitrr�cloudinit.cloudr�cloudinit.configr�cloudinit.config.schemarr	�cloudinit.distrosr
�cloudinit.settingsr�MODULE_DESCRIPTIONr�__annotations__r$�str�listr,r*r*r*r+�<module>sX
�����!������