+
    i                        a  R t0 t R t^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHt R	R
R].R]R. /t] ^ k ]P&                  ! ]4      t ! R R]4      tR R ltR# )z#Set Hostname: Set hostname and FQDNN)util)
write_json)Cloud)Config)
MetaSchema)ALL_DISTROS)PER_INSTANCEidcc_set_hostnamedistros	frequencyactivate_by_schema_keysc                       ] tR t^tRtRtR# )SetHostnameErrorzRaised when the distro runs into an exception when setting hostname.

This may happen if we attempt to set the hostname early in cloud-init's
init-local timeframe as certain services may not be running yet.
 N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       B/usr/lib/python3/dist-packages/cloudinit/config/cc_set_hostname.pyr   r      s    r   r   c          
      L    V ^8  d   QhR\         R\        R\        R\        RR/# )   namecfgcloudargsreturnN)strr   r   list)formats   "r   __annotate__r#   '   s/     4> 4> 4>6 4>% 4>t 4> 4>r   c                    \         P                  ! VR R4      '       d   \        P                  RV 4       R# \         P                  ! VRR4      pVe   VP                  P                  RV4       \         P                  ! VRR4      pVe   VP                  P                  RV4       \         P                  ! W4      w  rgp\        P                  P                  VP                  R4      R4      p	/ p
\        P                  P                  V	4      '       dP   \        P                  ! V	4      P                  ^ 8  d+   \         P                  ! \         P                  ! V	4      4      p
WjP!                  R4      8g  ;'       g    WzP!                  R	4      8g  pV'       g   \        P                  R
4       R# V'       d   VR8X  d   \        P                  R4       R# \        P                  RWv4        VP                  P#                  Wg4       \+        T	RTR	T/4       R#   \$         d?   pRT: RT: R2p\         P&                  ! \        T4       \)        T: RT: 24      ThRp?ii ; i)preserve_hostnameFzVConfiguration option 'preserve_hostname' is set, not setting the hostname in module %sNprefer_fqdn_over_hostnamecreate_hostname_filedatazset-hostnamehostnamefqdnz*No hostname changes. Skipping set_hostname	localhostz6Hostname is localhost. Let other services handle this.zSetting the hostname to %s (%s)zFailed to set the hostname to z ()z: )r   get_cfg_option_boolLOGdebugdistro
set_optionget_hostname_fqdnospathjoin	get_cpathexistsstatst_size	load_jsonload_text_filegetset_hostname	Exceptionlogexcr   r   )r   r   r   r   hostname_fqdnr'   r)   r*   
is_defaultprev_fnprev_hostnamehostname_changedemsgs   &&&&          r   handlerG   '   s   %8%@@		5	

 	 ,,($M   ;]K  33#T ' 68LM#'#9#9##E XZ ggll5??62NCGM	ww~~g2777#3#;#;a#?t':':7'CD#4#4$  + +	""6*	*  		>?h+-		JKII/@;!!(1
 wXvt<=	  ;9=xHC323:;s   /H I%'9I  I%c                @    V ^8  d   Qh/ ^ \         9   d
   \        ;R&   # )r   meta)__conditional_annotations__r   )r"   s   "r   r#   r#      s     ) ) j  *r   )rJ   r   loggingr3   	cloudinitr   cloudinit.atomic_helperr   cloudinit.cloudr   cloudinit.configr   cloudinit.config.schemar   cloudinit.distrosr   cloudinit.settingsr   rI   	getLoggerr   r.   r>   r   rG   r#   )rJ   s   @r   <module>rT      sn    *  	  . ! # . ) + 	
}r	  !y 4>r   