܍~cQ UdZddlZddlmZddlmZddlmZddlm Z ddl m Z m Z ddl mZdd lmZd Zd d d eegeggdZe ed<e eZdZdede dedededdf dZdS)z.Scripts Per Instance: Run per instance scriptsN)Logger)subp)Cloud)Config) MetaSchema get_meta_doc) ALL_DISTROS) PER_INSTANCEa[Any scripts in the ``scripts/per-instance`` directory on the datasource will be run when a new instance is first booted. Scripts will be run in alphabetical order. This module does not accept any config keys. Some cloud platforms change instance-id if a significant change was made to the system. As a result per-instance scripts will run again. cc_scripts_per_instancezScripts Per InstancezRun per instance scripts)idnametitle descriptiondistros frequencyexamplesactivate_by_schema_keysmetaz per-instancer cfgcloudlogargsreturnctj|dt} t j|dS#t$r|d|t|wxYw)Nscriptsz"Failed to run module %s (%s in %s)) ospathjoin get_cpath SCRIPT_SUBDIRrrunparts Exceptionwarning)r rrrr runparts_paths J/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_per_instance.pyhandler&.s GLL!2!2I}MMM  m$$$$$  0       s A)A9)__doc__rloggingr cloudinitrcloudinit.cloudrcloudinit.configrcloudinit.config.schemarrcloudinit.distrosr cloudinit.settingsr MODULE_DESCRIPTIONr__annotations__r strlistr&r%r5sD544 !!!!!!######<<<<<<<<))))))++++++ $ " '%}!  j    ,t    #(/5=A r4