
    x[h	              
           % S r SSKrSSKJrJrJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  SS	/\S
/S.r\\S'   \R                   " \5      rS\S\	S\S\SS4
S jrg)z@Update Etc Hosts: Update the hosts file (usually ``/etc/hosts``)    N)	lifecycle	templaterutil)Cloud)Config)
MetaSchema)
PER_ALWAYScc_update_etc_hostsallmanage_etc_hosts)iddistros	frequencyactivate_by_schema_keysmetanamecfgcloudargsreturnc                    [         R                  " USS5      nUR                  R                  n[         R                  " US/S9(       a  US:X  a  [
        R                  " SSSS9  [         R                  " X5      u  pgnU(       d  [        R                  S	5        g UR                  S
UR                  R                  -  5      n	U	(       d"  [        SUR                  R                  -  5      e[        R                  " XXgS.5        g US:X  ah  [         R                  " X5      u  pgnU(       d  [        R                  S	5        g [        R                  SU5        UR                  R!                  Xg5        g [        R                  SUU 5        g )Nr   Ftemplate)addonsz+Value 'template' for key 'manage_etc_hosts'z22.2zUse 'true' instead.)
deprecateddeprecated_versionextra_messagez<Option 'manage_etc_hosts' was set, but no hostname was foundzhosts.%sz.No hosts template could be found for distro %s)hostnamefqdn	localhostzManaging localhost in %szPConfiguration option 'manage_etc_hosts' is not set, not managing %s in module %s)r   get_cfg_option_strdistrohosts_fntranslate_boolr   	deprecateget_hostname_fqdnLOGwarningget_template_filenameosfamilyRuntimeErrorr   render_to_filedebugupdate_etc_hosts)
r   r   r   r   manage_hostsr"   r   r   _tpl_fn_names
             F/usr/lib/python3/dist-packages/cloudinit/config/cc_update_etc_hosts.pyhandler2      sV   **30BEJL||$$H<=:%H#)3
 #44S@KKN  11%,,//0
 @<<((* 
 	  #G	
 
	$"44S@KKN 		,h7%%h5		,		
    )__doc__logging	cloudinitr   r   r   cloudinit.cloudr   cloudinit.configr   cloudinit.config.schemar   cloudinit.settingsr	   r   __annotations__	getLogger__name__r&   strlistr2    r3   r1   <module>rA      s{    G  0 0 ! # . )  w 23	j  !1
 1
6 1
% 1
t 1
 1
r3   