
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
\me<              	   @   s   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eZ ejeZdZeeeeddddZdS )z.Scripts Per Instance: Run per instance scripts    N)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.
Zcc_scripts_per_instancezScripts Per InstancezRun per instance scripts)idnametitledescriptionZdistrosZ	frequencyZexamplesZactivate_by_schema_keyszper-instance)r
   cfgcloudargsreturnc             C   sN   t jj|j dt}ytj| W n& tk
rH   tj	d| t|  Y nX d S )Nscriptsz"Failed to run module %s (%s in %s))
ospathjoinZ	get_cpathSCRIPT_SUBDIRr   Zrunparts	ExceptionLOGZwarning)r
   r   r   r   Zrunparts_path r   -/usr/lib/python3.6/cc_scripts_per_instance.pyhandle.   s    r   )__doc__Zloggingr   Z	cloudinitr   Zcloudinit.cloudr   Zcloudinit.configr   Zcloudinit.config.schemar   r   Zcloudinit.distrosr   Zcloudinit.settingsr   ZMODULE_DESCRIPTIONmetaZ	getLogger__name__r   r   strlistr   r   r   r   r   <module>   s*   	
