+
    ˜qgjL  ã                   ó€  a € RT t+0 t R t^ RIt^ RIt^ RIt^ RIHtHt ^ RIH	t	H
t
HtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ]P,                  ! ]4      t]tRt^t. R	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NtR(R)R*R+R,R-R(.R.R(R/R0R1R/R2R)R3R+]R-R4.R.R2R/R5R1R/R6R)R6R+]R-R6.R.R6R/R5R1R/R7R)R3R+R8R-. R.R3R/R9R1R/R:R)R;R+R<R-. R.R:R/R=R1R//t/ R
R(R+R>R.R*/R2R+RR-. R.R3//bRR:R)R?R+R@//bRR(R.R*/R:R)R?R+R@//bRR2R.R3/R(R.R*//bRR(R.R*R+R>//bRR(R+R>//bRR2R+RR.R3R/R5/R(R+RAR-R(.R.R*R/R0/R7R)RBR+RCR-R7.R.R7R/RD//bRR(R.R*/R:R)R?R+R@//bRR7/ /bRR(R.R*/R2R+RR.R3/R:R)R;//bRR(R.R*/R2R+RR.R3/R:R)R?//bRR(R.R*/R2R.R3R+R/R:R)R?R+R@//bRR:R)R?//bR R2R.R3/R(R.R*//bR$R(R.R*/R2R+RR.R3/R:R)R?//bR&R(R+R>//bt] ^ k RU F  t]R,          ]]&   K  	  RV F  t]R ,          ]]&   K  	  RW F  t]R$,          ]]&   K  	  RERFRG]RH]RIR2./t ] ^k ]!! . RXO4      t"RJ t#RK RL lt$RYRM lt%RZRN lt&RO t'R[RP lt(RQ t)RR RS lt*R# )\zNTP: enable and configure ntpN)ÚDictÚMapping)ÚsubpÚ
temp_utilsÚ	templaterÚ
type_utilsÚutil)ÚCloud)ÚConfig)Ú
MetaSchema)ÚPER_INSTANCEz/etc/ntp.confÚ	almalinuxÚalpineÚaoscÚ
azurelinuxÚcentosÚ
cloudlinuxÚcosÚdebianÚ	eurolinuxÚfedoraÚfreebsdÚmarinerÚmiraclelinuxÚopenbsdÚ	openeulerÚOpenCloudOSÚopenmandrivaÚopensuseúopensuse-microosúopensuse-tumbleweedúopensuse-leapÚphotonzraspberry-pi-osÚrhelÚrockyÚsle_hpcú	sle-microÚslesÚ	TencentOSÚubuntuÚ	virtuozzoÚchronyÚ	check_exeÚchronydÚconfpathz/etc/chrony.confÚpackagesÚservice_nameÚtemplate_namezchrony.conf.{distro}ÚtemplateÚntpÚntpdÚntpseczntp.conf.{distro}ÚntpdateÚopenntpdz/etc/ntpd.confzntpd.conf.{distro}zsystemd-timesyncdz/lib/systemd/systemd-timesyncdz-/etc/systemd/timesyncd.conf.d/cloud-init.confztimesyncd.confz/etc/chrony/chrony.confz"/usr/lib/systemd/systemd-timesyncdz/etc/systemd/timesyncd.confz/usr/local/etc/chrony.confz/usr/local/sbin/ntpdz/usr/local/etc/ntp.confzntpd.conf.openbsdÚidÚcc_ntpÚdistrosÚ	frequencyÚactivate_by_schema_keysc                ó’   € \         p\        P                  ! \        4      pW9   d!   \        P                  ! W!V ,          .RR7      pV# )zâConstruct a distro-specific ntp client config dictionary by merging
   distro specific changes into base config.

@param distro: String providing the distro class name.
@returns: Dict of distro configurations for ntp clients.
T©Úreverse)ÚDISTRO_CLIENT_CONFIGÚcopyÚNTP_CLIENT_CONFIGr   Úmergemanydict)ÚdistroÚdcfgÚcfgs   &  Ú9/usr/lib/python3/dist-packages/cloudinit/config/cc_ntp.pyÚdistro_ntp_client_configsrH     s;   € ô  €DÜ
�)Š)Ô%Ó
&€CØ„~Ü× Ò  #¨F¥|Ð!4¸dÔCˆØ€Jó    c                ó$   € V ^8„  d   QhR\         /# )é   Úreturn)r   )Úformats   "rG   Ú__annotate__rN   !  s   € ÷ /ñ /¬Wñ /rI   c                ó€  € \        VP                  4      pV '       d0   V R8w  d)   \        P                  RV 4       VP	                  V / 4      # VP                  RR4      p/ pVR8X  d¯   VP                   FY  pVP	                  V4      p\        P                  ! VP	                  R4      4      '       g   KA  \        P                  RV4       Tp M	  V'       g<   VP                  ^ ,          p\        P                  RV4       VP	                  V/ 4      pV# \        P                  RV4       VP	                  V/ 4      pV# )zùDetermine which ntp client is to be used, consulting the distro
   for its preference.

@param ntp_client: String name of the ntp client to use.
@param distro: Distro class instance.
@returns: Dict of the selected ntp client or {} if none selected.
Úautoz4Selected NTP client "%s" via user-data configurationÚ
ntp_clientr,   z+Selected NTP client "%s", already installedz<Selected distro preferred NTP client "%s", not yet installedz1Selected NTP client "%s" via distro system config)	rH   ÚnameÚLOGÚdebugÚgetÚ
get_optionÚpreferred_ntp_clientsr   Úwhich)rQ   rD   Ú
distro_cfgÚdistro_ntp_clientÚ	clientcfgÚclientrF   s   &&     rG   Úselect_ntp_clientr]   !  s#  € ô +¨6¯;©;Ó7€J÷ �j FÔ*Ü�	‰	ØBÀJô	
ð �~‰~˜j¨"Ó-Ð-ð ×)Ñ)¨,¸Ó?Ðà€IØ˜FÔ"Ø×2Ô2ˆFØ—.‘. Ó(ˆCÜ�zŠz˜#Ÿ'™' +Ó.×/Ô/Ü—	‘	ØAÀ6ôð  �	Ùñ 3÷ Ø×1Ñ1°!Õ4ˆFÜ�I‰IØNØôð #Ÿ™ v¨rÓ2ˆIð Ðô 	�	‰	Ø?Øô	
ð —N‘NÐ#4°bÓ9ˆ	àÐrI   c                óR   € \         P                  ! V4      '       d   R# V ! V4       R# )aP  Install ntp client package if not already installed.

@param install_func: function.  This parameter is invoked with the contents
of the packages parameter.
@param packages: list.  This parameter defaults to ['ntp'].
@param check_exe: string.  The name of a binary that indicates the package
the specified package is already installed.
N)r   rX   )Úinstall_funcr/   r,   s   &&&rG   Úinstall_ntp_clientr`   S  s   € ô ‡z‚z�)×ÒÙá�ÖrI   c                óŽ   € \         P                  P                  V 4      '       d    \        P                  ! W R,           4       R# R# )z‚Rename any existing ntp client config file

@param confpath: string. Specify a path to an existing ntp client
configuration file.
z.distN)ÚosÚpathÚexistsr   Úrename©r.   s   &rG   Úrename_ntp_confrg   b  s-   € ô 
‡w�w‡~�~�h×ÒÜ�Š�H¨Õ0Ö1ñ  rI   c           	     ó  € . pT pV R8X  d   RpMV R8X  g   V R8X  d   Rp\        \        4       FV  pTP                  RP                  \	        V4      .V.,           R.,            Uu. uF  qD'       g   K  VNK  	  up4      4       KX  	  V# u upi )zËGenerate a list of server names to populate an ntp client configuration
file.

@param distro: string.  Specify the distro name
@returns: list: A list of strings representing ntp servers for this distro.
r'   r   r   r   Ú Ú.zpool.ntp.org)ÚrangeÚNR_POOL_SERVERSÚappendÚjoinÚstr)rD   ÚnamesÚpool_distroÚxÚns   &    rG   Úgenerate_server_namesrt   l  s”   € ð €EØ€Kà�Ôð !‰Ø	�8Ô	˜v¨Ô4ð ˆä”?Ö#ˆØ�‰Ø�H‰HÜ  ›V˜H¨ }Õ4¸Ð7GÖGÓMÑG�qË1—�ÑGÑMóö	
ñ $ð €Lùò	 Ns   Á%	B
Á3B
c	                óô  € V'       g   . pV'       g   . pV'       g   . pV'       g   . pV'       g   V'       g
   V R8X  d   R# V'       g@   V R8X  d9   VR8X  d2   \        V 4      p\        P                  RRP                  V4      4       M@V'       g9   V'       g1   \        V 4      p\        P                  RRP                  V4      4       V'       g   \	        R4      hV'       g   V'       g   \	        R	4      hR
VRVRVRV/p	V'       d9   \
        P                  ! RRR7      p
V
^,          p\        P                  ! WxR7       \        P                  ! WvV	4       V'       d   \        P                  ! V4       R# R# )a–  Render a ntp client configuration for the specified client.

@param distro_name: string.  The distro class name.
@param service_name: string. The name of the NTP client service.
@param servers: A list of strings specifying ntp servers. Defaults to empty
list.
@param pools: A list of strings specifying ntp pools. Defaults to empty
list.
@param allow: A list of strings specifying a network/CIDR. Defaults to
empty list.
@param peers: A list nodes that should peer with each other. Defaults to
empty list.
@param path: A string to specify where to write the rendered template.
@param template_fn: A string to specify the template source file.
@param template: A string specifying the contents of the template. This
content will be written to a temporary file before being used to render
the configuration file.

@raises: ValueError when path is None.
@raises: ValueError when template_fn is None and template is None.
r   Nr   r4   z%Adding distro default ntp servers: %sÚ,z*Adding distro default ntp pool servers: %sz Invalid value for path parameterz$Not template_fn or template providedÚserversÚpoolsÚallowÚpeersztemplate_name-z.tmpl)ÚprefixÚsuffix)Úcontent)rt   rS   rT   rn   Ú
ValueErrorr   Úmkstempr   Ú
write_filer   Úrender_to_fileÚdel_file)Údistro_namer0   rw   rx   ry   rz   rc   Útemplate_fnr2   ÚparamsÚtfiles   &&&&&&&&&  rG   Úwrite_ntp_config_templater‡   ‰  s!  € ÷@ ØˆßØˆßØˆßØˆçŸ5 [°EÔ%9Ùß�{ hÔ.°<À6Ô3Iô (¨Ó4ˆÜ�	‰	Ð9¸3¿8¹8ÀGÓ;LÕMß§Ü% kÓ2ˆÜ�	‰	Ø8¸#¿(¹(À5»/ô	
÷ ÜÐ;Ó<Ð<çŸxÜÐ?Ó@Ð@ð 	�7Ø�Ø�Ø�ð	€F÷ Ü×"Ò"Ð*:À7ÔKˆØ˜A•hˆÜ�Š˜Õ6ä×Ò˜[°Ô7çÜ�Š�kÖ"ñ rI   c                óL  € . p\         P                  \        V P                  4       4      4      pV'       d=   RP	                  \        V4      4      pVP                  RP                  VR7      4       MB\        V P                  R4      V P                  R4      .4      '       g   VP                  R4       \        V P                  4       4       EF  w  rERV,           pVR8X  dG   \        V\        V\        4      .4      '       g$   VP                  R	P                  WeR
7      4       KZ  K\  VR8X  d<   \        V\        4      '       g$   VP                  RP                  WeR
7      4       Kœ  Kž  VR9   dB   Vf   K«  \        V\        4      '       g$   VP                  RP                  WeR
7      4       Kä  Kæ  \        V\        4      '       d   Kþ  VP                  RP                  WeR
7      4       EK"  	  V'       d+   \        RP                  RP	                  V4      R7      4      hR# )a;  Validate user-provided ntp:config option values.

This function supplements flexible jsonschema validation with specific
value checks to aid in triage of invalid user-provided configuration.

@param ntp_config: Dictionary of configuration value under 'ntp'.

@raises: ValueError describing invalid values provided.
z, z(Missing required ntp:config keys: {keys})Úkeysr2   r1   zJEither ntp:config:template or ntp:config:template_name values are requiredzntp:config:r.   z6Expected a config file path {keypath}. Found ({value}))ÚkeypathÚvaluer/   zHExpected a list of required package names for {keypath}. Found ({value})Nz5Expected a string type for {keypath}. Found ({value})z$Invalid ntp configuration:\n{errors}Ú
)Úerrors)r2   r1   )ÚREQUIRED_NTP_CONFIG_KEYSÚ
differenceÚsetr‰   rn   Úsortedrm   rM   ÚanyrU   ÚitemsÚallÚ
isinstancero   Úlistr~   )Ú
ntp_configr�   Úmissingr‰   Úkeyr‹   rŠ   s   &      rG   Úsupplemental_schema_validationrš   Ö  sÝ  € ð €FÜ&×1Ñ1´#°j·o±oÓ6GÓ2HÓI€GßØ�y‰yœ ›Ó)ˆØ�‰Ø6×=Ñ=À4Ð=ÓHõ	
ô Ø	�‰˜
Ó	# Z§^¡^°OÓ%DÐE÷ò ð 	�‰ðô	
ô ˜Z×-Ñ-Ó/×0‰
ˆØ #Õ%ˆØ�*ÔÜ˜œz¨%´Ó5Ð6×7Ò7Ø—‘ð'ß'-¡v°g vÓ'Köñ 8ð
 �JÔÜ˜e¤T×*Ò*Ø—‘ð'ß'-¡v°g vÓ'Köñ +ð
 Ð1Ô1ØŠ}ÙÜ˜e¤S×)Ò)Ø—‘ð'ß'-¡v°g vÓ'Köñ *ô
 ˜E¤3×'Ô'Ø�M‰MØG×NÑNØ#ð Oó ÷ñ/ 1÷: ÜØ3×:Ñ:Ø—y‘y Ó(ð ;ó ó
ð 	
ñ rI   c          
      óL   € V ^8„  d   QhR\         R\        R\        R\        RR/# )rK   rR   rF   ÚcloudÚargsrL   N)ro   r
   r	   r–   )rM   s   "rG   rN   rN     s6   € ÷ _ñ _”ð _œ6ð _¬%ð _´tð _Àñ _rI   c                ó^	  € RV9  d   \         P                  RV 4       R# VR,          pVf   / p\        V\        4      '       g0   \	        RP                  \        P                  ! V4      R7      4      hVP                  RR4      p\        P                  ! V4      '       d   \         P                  RV 4       R# \        VP                  R	4      VP                  4      p\        P                  ! WdP                  R
/ 4      .RR7      p\        V4       \        VP                  R4      R7       RpVP                  R4      '       gj   VR,          P!                  RVP                  P"                  4      pVP%                  V4      pV'       g$   RVP                  R4      ,          p	\	        V	4      h\         P                  RVP                  R4      4       \         P                  RVP                  R. 4      4       \         P                  RVP                  R. 4      4       \         P                  RVP                  R. 4      4       \         P                  RVP                  R. 4      4       \'        VP                  P"                  VP                  R4      VP                  R. 4      VP                  R. 4      VP                  R. 4      VP                  R. 4      VP                  R4      VVP                  R4      R7	       \)        VP                  P*                  VR,          VR,          R7       \        P,                  ! 4       '       du   VP                  R4      R 8w  d;    VP                  P/                  R!R 4        VP                  P/                  R#R 4        VP                  P/                  R%VR,          4        VP                  P/                  R'VR,          4       R#   \0        P2                   d    \         P5                  R"4        L“i ; i  \0        P2                   d    \         P5                  R$4        L¦i ; i  \0        P2                   d   p
\         P7                  R&T
4       h Rp
?
ii ; i  \0        P2                   d   p
\         P7                  R(T
4       h Rp
?
ii ; i))zEnable and configure ntp.r3   z8Skipping module named %s, not present or disabled by cfgNzL'ntp' key existed in config, but not a dictionary type, is a {_type} instead)Ú_typeÚenabledTz)Skipping module named %s, disabled by cfgrQ   Úconfigr>   r.   rf   r2   r1   z{distro}z#No template found, not rendering %szservice_name: %sr0   zservers: %srw   z	pools: %srx   z	allow: %sry   z	peers: %srz   )r0   rw   rx   ry   rz   rc   r„   r2   r/   r,   )r/   r,   r4   Ústopz Failed to stop base ntpd serviceÚdisablez#Failed to disable base ntpd serviceÚenablez Failed to enable ntp service: %sÚreloadz&Failed to reload/start ntp service: %s)rS   rT   r•   ÚdictÚRuntimeErrorrM   r   Úobj_namerU   r   Úis_falser]   rD   rC   rš   rg   ÚreplacerR   Úget_template_filenamer‡   r`   Úinstall_packagesÚis_BSDÚmanage_servicer   ÚProcessExecutionErrorÚwarningÚ	exception)rR   rF   rœ   r�   Úntp_cfgr    Úntp_client_configr„   r1   ÚmsgÚes   &&&&       rG   Úhandler¶     sÎ  € à�CÔÜ�	‰	ØFÈô	
ñ 	Ø�%�j€GØ‚Øˆô �g¤×&Ò&Üð$ß$*¡F´×1DÒ1DÀWÓ1M FÓ$Nó
ð 	
ð �k‰k˜) TÓ*€GÜ‡}‚}�W×ÒÜ�	‰	Ð=¸tÔDÙô *Ø�‰�LÓ! 5§<¡<óÐô ×*Ò*Ø	ŸK™K¨°"Ó5Ð6ÀôÐô #Ð#4Ô5ÜÐ.×2Ñ2°:Ó>Õ?à€KØ× Ñ  ×,Ò,Ø)¨/Õ:×BÑBØ˜Ÿ™×)Ñ)ó
ˆð ×1Ñ1°-Ó@ˆßà5Ø#×'Ñ'¨Ó8õ9ð ô ˜sÓ#Ð#ä‡I�IÐ Ð"3×"7Ñ"7¸Ó"GÔHÜ‡I�Iˆm˜WŸ[™[¨°BÓ7Ô8Ü‡I�Iˆk˜7Ÿ;™; w°Ó3Ô4Ü‡I�Iˆk˜7Ÿ;™; w°Ó3Ô4Ü‡I�Iˆk˜7Ÿ;™; w°Ó3Ô4ÜØ�‰×ÑØ&×*Ñ*¨>Ó:Ø—‘˜I rÓ*Ø�k‰k˜' 2Ó&Ø�k‰k˜' 2Ó&Ø�k‰k˜' 2Ó&Ø×"Ñ" :Ó.ØØ"×&Ñ& zÓ2õ
ô Ø�‰×%Ñ%Ø" :Õ.Ø# KÕ0õô
 ‡{‚{‡}‚}Ø× Ñ  Ó0°FÔ:ð@Ø—‘×+Ñ+¨F°FÔ;ðCØ—‘×+Ñ+¨I°vÔ>ð	Ø�L‰L×'Ñ'ØÐ+¨NÕ;ôðØ�‰×#Ñ#ØÐ'¨Õ7ö	
øô ×-Ñ-ô @Ü—‘Ð>Ö?ð@ûô ×-Ñ-ô CÜ—‘ÐAÖBðCûô ×)Ñ)ô 	Ü�M‰MÐ<¸aÔ@Øûð	ûô ×%Ñ%ô Ü�‰Ð>ÀÔBØûðúsT   Í$O' ÎP Î#Q Ï#Q; Ï'*PÐPÐ*QÑQÑQ8ÑQ3Ñ3Q8Ñ;R,ÒR'Ò'R,c                óŠ   € V ^8„  d   Qh/ ^ \         9   d   \        \        \        3,          ;R&   ^\         9   d
   \        ;R&   # )rK   r@   Úmeta)Ú__conditional_annotations__r   ro   r   )rM   s   "rG   rN   rN      sC   € × #Ñ #÷@Nò N”dœ3¤˜9•oñ NñA $÷~ò „jñ ò $rI   )r   r    r!   )r   r   r$   )r%   r&   )r,   r.   r/   r0   )Nr4   )N)NNNNNNNN),r¹   Ú__doc__rA   Úloggingrb   Útypingr   r   Ú	cloudinitr   r   r   r   r   Úcloudinit.cloudr	   Úcloudinit.configr
   Úcloudinit.config.schemar   Úcloudinit.settingsr   Ú	getLoggerÚ__name__rS   r;   ÚNTP_CONFrl   r:   rB   r@   rD   r¸   Ú	frozensetrŽ   rH   r]   r`   rg   rt   r‡   rš   r¶   rN   )r¹   s   @rG   Ú<module>rÆ      sg  øðö $ã Û Û 	ß  ç CÕ CÝ !Ý #Ý .Ý +à×Ò˜Ó!€à€	Ø€Ø€ð Øð àð ð ð ð ð	 ð
 ð ð ð ð 
ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð  ð! ð" ð# ð$ ð% ð& ð' ð( ð) ð* ð+ ð, ð- ð. ð/ ð0 ð1 ð2 ð3 ð4 ð5 ð6 ð7 ð8 ð9 ð: ð; ð< ð= ð> ð? €ðF Ø�YØÐ&Ø�X�JØ˜ØÐ/Ø�Dðð 
Ø�VØ�HØ�X�JØ˜ØÐ,Ø�Dðð Ø�YØ�HØ�Y�KØ˜	ØÐ,Ø�Dðð Ø�VØÐ$Ø�BØ˜ØÐ-Ø�Dðð ØÐ5ØÐCØ�BØÐ+ØÐ)Ø�DððC)Ð ðXN)ØØØÐ1Ø˜Ið
ð 	Ø˜Ø˜Ø˜Fð
ð
ðN)ð ØØÐ=ØÐ5ð
ððN)ð$ ØØ˜Ið
ð 	ØÐ=ØÐ5ð
ð	ð%N)ð6 ØØ˜Fð
ð 	Ø˜Ið
ð	ð7N)ðF 
ØØ˜IØÐ1ð
ððGN)ðR ØØÐ1ð
ððSN)ð\ ØØ˜Ø˜FØÐ0ð
ð
 	ØÐ4Ø˜˜
Ø˜IØÐ3ð	
ð 	ØÐ/ØÐ1Ø˜˜Ø˜JØÐ0ð
ðð]N)ðD ØØ˜Ið
ð 	ØÐ=ØÐ5ð
ð	ðEN)ðV Ø�BððWN)ð\ ØØ˜Ið
ð 	Ø˜Ø˜Fð
ð 	ØÐ9ð
ðð]N)ðt ØØ˜Ið
ð 	Ø˜Ø˜Fð
ð 	ØÐ=ð
ððuN)ðL ØØ˜Ið
ð 	� ¨
°OÐDØØÐ=ØÐ5ð
ð	ðMN)ð` ØØÐ=ð
ððaN)ðj ØØ˜Fð
ð 	Ø˜Ið
ð	ðkN)ðz ØØ˜Ið
ð 	Ø˜Ø˜Fð
ð 	ØÐ=ð
ðð{N)ðR ØØÐ1ð
ððSN)Ð ó Nó` K€FØ#7¸
Õ#CÐ˜Ó ñ Kó 3€FØ#7¸Õ#?Ð˜Ó ñ 3ó '€FØ#7¸Õ#?Ð˜Ó ñ 'ð 	ˆ(ØˆwØ�Ø ˜wð	€ó ñ %Ú9óÐ ò
õ/ôdô2òô:J#òZ:
÷z_rI   