
    fe              
           U d Z ddlZddl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 ddlmZ d	Zd
ddeegeg g dZe
ed<    ee      Z  ej&                  e      ZdZdededededdf
dZy)zScripts User: Run user scripts    N)subp)Cloud)Config)
MetaSchemaget_meta_doc)ALL_DISTROS)PER_INSTANCEa  This module runs all user scripts. User scripts are not specified in the
``scripts`` directory in the datasource, but rather are present in the
``scripts`` dir in the instance configuration. Any cloud-config parts with a
``#!`` will be treated as a script and run. Scripts specified as cloud-config
parts will be run in the order they are specified in the configuration.
This module does not accept any config keys.
cc_scripts_userzScripts UserzRun user scripts)idnametitledescriptiondistros	frequencyexamplesactivate_by_schema_keysmetascriptsr   cfgcloudargsreturnc                     t         j                  j                  |j                         t              }	 t        j                  |       y # t        $ r t        j                  d| t        |        w xY w)Nz"Failed to run module %s (%s in %s))
ospathjoinget_ipath_curSCRIPT_SUBDIRr   runparts	ExceptionLOGwarning)r   r   r   r   runparts_paths        B/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.pyhandler%   /   s^     GGLL!4!4!6FM	m$ 0		
 	s   A
 
'A1)__doc__loggingr   	cloudinitr   cloudinit.cloudr   cloudinit.configr   cloudinit.config.schemar   r   cloudinit.distrosr   cloudinit.settingsr	   MODULE_DESCRIPTIONr   __annotations__	getLogger__name__r!   r   strlistr%        r$   <module>r6      s    %  	  ! # < ) +  %}!	j 	 t
g!  6 % t  r5   