+
    ˜qgjà*  ã                   óZ  a € R t+0 t R t^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
Ht ^ RI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HtHt ^ R
IHt RtR.t Rt!RRR].R]RR./t"] ^ k ]PF                  ! ]$4      t% ! R R4      t&R R lt'R t(]RRR3R R llt)R R lt*R# )z+Puppet: Install, configure and start puppetN)Úsuppress)ÚStringIO)ÚListÚUnion)ÚhelpersÚsubpÚ
temp_utilsÚ
url_helperÚutil)ÚCloud)ÚConfig)Ú
MetaSchema)ÚALL_DISTROSÚDistroÚPackageInstallerError)ÚPER_INSTANCEzKhttps://raw.githubusercontent.com/puppetlabs/install-puppet/main/install.shz--testÚpuppetÚidÚ	cc_puppetÚdistrosÚ	frequencyÚactivate_by_schema_keysc                   ó&   a € ] tR t^)t o R tRtV tR# )ÚPuppetConstantsc                óÒ   € Wn         W n        \        P                  P	                  VR 4      V n        \        P                  P	                  V P
                  R4      V n        W0n        R# )Úcertszca.pemN)Ú	conf_pathÚssl_dirÚosÚpathÚjoinÚssl_cert_dirÚssl_cert_pathÚcsr_attributes_path)ÚselfÚpuppet_conf_fileÚpuppet_ssl_dirr#   s   &&&&Ú</usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.pyÚ__init__ÚPuppetConstants.__init__*   sH   € ð *ŒØ%ŒÜŸG™GŸL™L¨¸ÓAˆÔÜŸW™WŸ\™\¨$×*;Ñ*;¸XÓFˆÔØ#6Ö ó    )r   r#   r!   r"   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r(   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r'   r   r   )   s   ø‡ € ÷
7ð 
7r*   r   c                ó0   € V ^8„  d   QhR\         R\        /# )é   ÚcloudÚaction)r   Ústr)Úformats   "r'   Ú__annotate__r8   7   s   € ÷ 
ñ 
¤5ð 
´#ñ 
r*   c                ó  € Rp\          F$  p V P                  P                  W R24       Tp M	  V'       g-   \
        P                  RVRP                  \         4      4       R# R#   \        P                   d     Kv  i ; i)z8Attempts to perform action on one of the puppet servicesÚ z.servicez0Could not '%s' any of the following services: %sú, N)ÚPUPPET_PACKAGE_NAMESÚdistroÚmanage_servicer   ÚProcessExecutionErrorÚLOGÚwarningr    )r4   r5   Úservice_managedÚpuppet_names   &&  r'   Ú_manage_puppet_servicesrD   7   sz   € à€Oß+ˆð	Ø�L‰L×'Ñ'¨°-¸xÐ0HÔIØ)ˆOÙñ	 ,÷ Ü�‰Ø>ØØ�I‰IÔ*Ó+ö	
ñ øô ×)Ñ)ô 	Úð	ús   � A'Á'B Á?B c                óZ   € \         P                   ! V RRV.4      w  r#VP                  4       # )z�Get the config value for a given setting using `puppet config print`
:param puppet_bin: path to puppet binary
:param setting: setting to query
ÚconfigÚprint)r   Úrstrip)Ú
puppet_binÚsettingÚoutÚ_s   &&  r'   Úget_config_valuerM   I   s)   € ô
 �YŠY˜
 H¨g°wÐ?Ó@�F€CØ�:‰:‹<Ðr*   Tc                ó$   € V ^8„  d   QhR\         /# )r3   r=   )r   )r7   s   "r'   r8   r8   R   s   € ÷ !7ñ !7Üñ!7r*   c                óæ  € . pVe   RV.pVe   VRV.,          pV'       d   VR.,          p\         P                  ! V^R7      P                  p\        P                  ! V P                  4       RR7      ;_uu_ 4       p\        P                  P                  VR4      p\        P                  ! W†R	R
7       \        P                  ! V.V,           RR7      uuRRR4       #   + '       g   i     R# ; i)a{  Install puppet-agent from the puppetlabs repositories using the one-shot
shell script

:param distro: Instance of Distro
:param url: URL from where to download the install script
:param version: version to install, blank defaults to latest
:param collection: collection to install, blank defaults to latest
:param cleanup: whether to purge the puppetlabs repo after installation
Nz-vz-cz	--cleanup)ÚurlÚretriesT)ÚdirÚ	needs_exezpuppet-installiÀ  )ÚmodeF©Úcapture)r	   ÚreadurlÚcontentsr   ÚtempdirÚget_tmp_exec_pathr   r   r    r
   Ú
write_filer   )	r=   rP   ÚversionÚ
collectionÚcleanupÚargsÚcontentÚtmpdÚtmpfs	   &&&&&    r'   Úinstall_puppet_aiorc   R   sÈ   € ð  €DØÒØ�gˆˆØÒØ��zÐ"Õ"ˆ÷ Ø��ÕˆÜ× Ò  S°!Ô4×=Ñ=€Gô 
×	Ò	Ø×$Ñ$Ó&°$÷
õ 
à	Ü�w‰w�|‰|˜DÐ"2Ó3ˆÜ�Š˜¨EÕ2Ü�yŠy˜$˜ $�°Ô6÷
÷ 
÷ 
ó 
ús   Á<ACÃC0	c          
      óL   € V ^8„  d   QhR\         R\        R\        R\        RR/# )r3   ÚnameÚcfgr4   r_   ÚreturnN)r6   r   r   Úlist)r7   s   "r'   r8   r8   v   s6   € ÷ r0ñ r0”ð r0œ6ð r0¬%ð r0´tð r0Àñ r0r*   c                 ó¶  € R V9  d   \         P                  RV 4       R# VR ,          p\        P                  ! VRR4      p\        P                  ! VRR4      p\        P                  ! VRR4      p\        P                  ! VRR4      p\        P                  ! VR	R4      p	\        P                  ! VR
RR7      p
\        P                  ! VRRR7      p\        P                  ! VR\
        R7      pVR8X  d   RpRpRpMR pR pRp\        P                  ! VRV4      pV'       g    V'       d   \         P                  R4       EM%V'       Ed   \         P                  RV'       d   TMRV4       VR8X  d¾   VfŽ   \         FQ  p\        \        4      ;_uu_ 4        V'       d   VV..MV.pVP                  P                  V4       Tp RRR4        M	  V'       g*   \         P                  RRP                  \        4      4       McV'       d   VV..MV.pVP                  P                  V4       M7VR8X  d   \        VP                  WÆWy4       M\         P                  RV4       Rp
\        P                  ! VR\        VR4      4      p\        P                  ! VR\        VR4      4      p\        P                  ! VR\        VR4      4      p\        VVV4      pR V9   Edw   \        P                   ! VP"                  4      p\$        P&                  ! 4       pVP)                  4        Uu. uF  pVP+                  4       NK  	  ppR!P                  V4      pVP-                  \/        V4      VP"                  R"7       VR ,          P1                  4        EFÁ  w  ppVR#8X  dÊ   \        P2                  ! VP4                  R$4       \        P6                  ! VP4                  VR4       \        P2                  ! VP8                  4       \        P6                  ! VP8                  VR4       \        P:                  ! VP<                  V4       \        P6                  ! VP<                  VR4       M‰VP1                  4        Fu  w  ppVR%8X  dV   VP?                  R&\@        PB                  ! 4       4      pVP?                  R'VPE                  4       4      pVPG                  4       pVPI                  VVV4       Kw  	  \        PJ                  ! VP"                  R(VP"                  ,          4       \        P:                  ! VP"                  VPM                  4       4       EKÄ  	  RV9   d?   \        P:                  ! VPN                  \P        PR                  ! VR,          RR)7      4       V'       d   \U        VR*4       V
'       dð   \         P                  R+4       VR,.pR-V9   d£   VR-,          p \W        V \X        \Z        34      '       d   VP]                  V 4       M€\W        V \^        4      '       d!   VP]                  V Pa                  4       4       MJ\         P                  R.\c        V 4      4       VP]                  \d        4       MVP]                  \d        4       \f        Pf                  ! VRR/7       V'       d   \U        VR04       R# R#   + '       g   i     EKU  ; iu upi )1r   z9Skipping module named %s, no 'puppet' configuration foundNÚinstallTr\   r]   Úinstall_typeÚpackagesr^   ÚexecF)ÚdefaultÚstart_serviceÚaio_install_urlÚaioÚrootz/opt/puppetlabs/bin/puppetúpuppet-agentÚpackage_namez@Puppet install set to false but version supplied, doing nothing.z'Attempting to install puppet %s from %sÚlatestz+No installable puppet package in any of: %sr;   z Unknown puppet install type '%s'Ú	conf_filerF   r   Ússldirr#   Úcsr_attributesÚconfÚ
)ÚsourceÚca_certiù  Úcertnamez%fz%iz%s.old)Údefault_flow_styleÚenablezRunning puppet-agentÚagentÚ	exec_argszOUnknown type %s provided for puppet 'exec_args' expected list, tuple, or stringrU   Ústart)4r@   Údebugr
   Úget_cfg_option_boolÚget_cfg_option_strÚAIO_INSTALL_URLrA   r<   r   r   r=   Úinstall_packagesr    rc   rM   r   Úload_text_filer   r   ÚDefaultingConfigParserÚ
splitlinesÚlstripÚ	read_filer   ÚitemsÚ
ensure_dirr   Úchownbynamer!   r[   r"   ÚreplaceÚsocketÚgetfqdnÚget_instance_idÚlowerÚsetÚrenameÚ	stringifyr#   ÚyamlÚdumprD   Ú
isinstancerh   ÚtupleÚextendr6   ÚsplitÚtypeÚPUPPET_AGENT_DEFAULT_ARGSr   )!re   rf   r4   r_   Ú
puppet_cfgrj   r\   r]   rk   r^   ÚrunÚstart_puppetdrp   Úpuppet_userrI   Úpuppet_packagert   rC   Ú
to_installrv   r   r#   Úp_constantsrX   Úpuppet_configÚiÚcleaned_linesÚcleaned_contentsÚcfg_nameÚoÚvÚcmdÚcmd_argss!   &&&&                             r'   Úhandler°   v   s¤  € à�sÔÜ�	‰	ØGÈô	
ñ 	à�X•€Jä×&Ò& z°9¸dÓC€GÜ×%Ò% j°)¸TÓB€GÜ×(Ò(¨°\À4ÓH€JÜ×*Ò*Ø�N Jó€Lô ×&Ò& z°9¸dÓC€GÜ
×
"Ò
" :¨v¸uÔ
E€CÜ×,Ò,Ø�O¨Tô€Mô ×-Ò-ØÐ%¬ô€Oð
 �uÔØˆØ1ˆ
Ø'‰àˆØˆ
Øˆä×*Ò*Ø�N Nó€L÷ —wÜ�‰ØNö	
÷ 
ˆÜ�	‰	Ø5ß‰G HØô	
ð ˜:Ô%àÒ#ß#7�KÜ!Ô"7×8Õ8÷  'ð *¨7Ð3Ñ4à"- ð #ð
 Ÿ™×5Ñ5°jÔAØ'2˜Ø÷ 9Ñ8ñ $8÷ $Ü—K‘KØEØŸ	™	Ô"6Ó7ôø÷ 29�l GÐ,Ñ-¸|¸nð ð —‘×-Ñ-¨jÕ9à˜UÔ"ÜØ—‘˜o¸
õô �K‰KÐ:¸LÔIØˆCä×'Ò'Ø�KÔ!1°*¸hÓ!Gó€Iô ×%Ò%Ø�IÔ/°
¸HÓEó€Gô ×1Ò1ØØÜ˜Ð%5Ó6óÐô " )¨WÐ6IÓJ€Kð �Õä×&Ò& {×'<Ñ'<Ó=ˆä×6Ò6Ó8ˆð .6×-@Ñ-@Ô-BÓCÑ-B¨˜Ÿ™žÑ-BˆÐCØŸ9™9 ]Ó3ÐØ×ÑÜÐ%Ó&¨{×/DÑ/Dð 	 ô 	
ð (¨Õ/×5Ñ5×7‰MˆH�cð ˜9Ô$ô —’ × 3Ñ 3°UÔ;Ü× Ò  ×!4Ñ!4°kÀ6ÔJÜ—’ × 8Ñ 8Ô9ä× Ò  ×!9Ñ!9¸;ÈÔOÜ—’ × 9Ñ 9¸3Ô?Ü× Ò Ø×-Ñ-¨{¸Fõð  ŸI™IžK‘D�A�qØ˜J”ð ŸI™I d¬F¯NªNÓ,<Ó=˜àŸI™I d¨E×,AÑ,AÓ,CÓD˜àŸG™G›I˜Ø!×%Ñ% h°°1Ö5ñ (ô �KŠKØ×%Ñ% x°;×3HÑ3HÕ'Iôô �OŠO˜K×1Ñ1°=×3JÑ3JÓ3L×MñC 8ðF ˜:Ô%Ü�ŠØ×+Ñ+Ü�IŠI�jÐ!1Õ2ÀuÔMô	
÷
 ä  xÔ0÷ Ü�	‰	Ð(Ô)Ø˜7Ð#ˆØ˜*Ô$Ø! +Õ.ˆHÜ˜(¤T¬5 M×2Ò2Ø—
‘
˜8Õ$Ü˜H¤c×*Ò*Ø—
‘
˜8Ÿ>™>Ó+Õ,ä—‘ð!ô ˜“Nô	ð —
‘
Ô4Õ5à�J‰JÔ0Ô1Ü�	Š	�#˜uÕ%çä  wÖ/ñ ÷w 9×8Ñ8üòf Ds   Æ/[Ì*[Û[c                ó@   € V ^8„  d   Qh/ ^ \         9   d
   \        ;R&   # )r3   Úmeta)Ú__conditional_annotations__r   )r7   s   "r'   r8   r8   	   s   € × 1Ñ 1÷,ò „jñ ò- 2r*   )rs   r   ),r³   Ú__doc__Úloggingr   r‘   Ú
contextlibr   Úior   Útypingr   r   r˜   Ú	cloudinitr   r   r   r	   r
   Úcloudinit.cloudr   Úcloudinit.configr   Úcloudinit.config.schemar   Úcloudinit.distrosr   r   r   Úcloudinit.settingsr   r†   rŸ   r<   r²   Ú	getLoggerr+   r@   r   rD   rM   rc   r°   r8   )r³   s   @r'   Ú<module>rÀ      s±   øðö 2ã Û 	Û Ý Ý ß ã ç AÕ AÝ !Ý #Ý .ß HÑ HÝ +à_€Ø%˜JÐ Ø1Ð ð 	ˆ+Ø�ˆ}Ø�Ø ˜zð	€ó ð ×Ò˜Ó!€÷7ñ 7õ
ò$ð 	ØØØ÷!7÷Hr0r*   