+
    i                        a  R t0 t R t^ RIt^ RI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RtRtR	R
RR.R]RR./t] ^ k R R ltR tR# )z0Apk Configure: Configures apk repositories file.N)
temp_utils	templaterutil)Cloud)Config)
MetaSchema)PER_INSTANCEz+https://alpine.global.ssl.fastly.net/alpinea  ## template:jinja
#
# Created by cloud-init
#
# This file is written on first boot of an instance
#

{{ alpine_baseurl }}/{{ alpine_version }}/main
{% if community_enabled -%}
{{ alpine_baseurl }}/{{ alpine_version }}/community
{% endif -%}
{% if testing_enabled -%}
{% if alpine_version != 'edge' %}
#
# Testing - using with non-Edge installation may cause problems!
#
{% endif %}
{{ alpine_baseurl }}/edge/testing
{% endif %}
{% if local_repo != '' %}

#
# Local repo
#
{{ local_repo }}/{{ alpine_version }}
{% endif %}

idcc_apk_configuredistrosalpine	frequencyactivate_by_schema_keys	apk_reposc          
      L    V ^8  d   QhR\         R\        R\        R\        RR/# )   namecfgcloudargsreturnN)strr   r   list)formats   "C/usr/lib/python3/dist-packages/cloudinit/config/cc_apk_configure.py__annotate__r   >   s6     2F 2F 2F6 2F% 2Ft 2F 2F    c                   VP                  R4      pV'       g   \        P                  RV 4       R# \        P                  ! VRR4      '       d   \        P                  RV 4       R# VP                  R4      pV'       g   \        P                  RV 4       R# VP                  R	4      pV'       g   \        P                  R
V 4       R# VP                  RR4      p\        WVV4       R# )a_  
Call to handle apk_repos sections in cloud-config file.

@param name: The module name "apk_configure" from cloud.cfg
@param cfg: A nested dict containing the entire cloud config contents.
@param cloud: The CloudInit object in use.
@param log: Pre-initialized Python logger object to use for logging.
@param _args: Any module arguments from cloud.cfg
r   z6Skipping module named %s, no 'apk_repos' section foundNpreserve_repositoriesFz8Skipping module named %s, 'preserve_repositories' is setalpine_repoz>Skipping module named %s, no 'alpine_repo' configuration foundversionz@Skipping module named %s, 'version' not specified in alpine_repolocal_repo_base_url )getLOGdebugr   get_cfg_option_bool_write_repositories_file)r   r   r   r   apk_sectionr   alpine_version
local_repos   &&&&    r   handler+   >   s     ''+&K		Dd	
 	 -DeLL		F	
 	
 //-0K		L	
 	 !__Y/N		N	
 	!6;J[*Er   c           
        RpV P                  R\        4      pRVRVRV P                  R4      RV P                  R4      RV/p\        P                  ! RR	R
7      pV^,          p\        P
                  ! V\        R7       \        P                  RV4       \        P                  ! WsV4       \        P                  ! V4       R# )a
  
Write the /etc/apk/repositories file with the specified entries.

@param alpine_repo: A nested dict of the alpine_repo configuration.
@param alpine_version: A string of the Alpine version to use.
@param local_repo: A string containing the base URL of a local repo.
z/etc/apk/repositoriesbase_urlalpine_baseurlr)   community_enabledtesting_enabledr*   ztemplate_name-z.tmpl)prefixsuffix)contentz3Generating Alpine repository configuration file: %sN)r#   DEFAULT_MIRRORr   mkstempr   
write_fileREPOSITORIES_TEMPLATEr$   r%   r   render_to_filedel_file)r   r)   r*   	repo_filer.   paramstfiletemplate_fns   &&&     r   r'   r'   s   s     (I __Z@N 	..[__-@A;??+<=jF &6wGE(KOOK)>?IICYO[V<MM+r   c                @    V ^8  d   Qh/ ^ \         9   d
   \        ;R&   # )r   meta)__conditional_annotations__r   )r   s   "r   r   r      s      6 6^ j _ 7r   )r@   __doc__logging	cloudinitr   r   r   cloudinit.cloudr   cloudinit.configr   cloudinit.config.schemar   cloudinit.settingsr   	getLogger__name__r$   r4   r7   r?   r+   r'   r   )r@   s   @r   <module>rJ      sr    7  1 1 ! # . +! ? > 	
z}	 2Fjr   