3
\me @ s U d Z ddlZddlmZ ddlmZmZmZ ddlm Z ddl
mZ ddlm
Z
mZ ddlmZ ejeZd Zd
ZeZdgZdd
dedeedededgedgdZe
eeZ eee eddddZdd ZdS )z0Apk Configure: Configures apk repositories file. N)dedent)
temp_utils templaterutil)Cloud)Config)
MetaSchemaget_meta_doc)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 %}
ZalpineZcc_apk_configurez
APK ConfigurezConfigure apk repositories filez This module handles configuration of the /etc/apk/repositories file.
.. note::
To ensure that apk configuration is valid yaml, any strings
containing special characters, especially ``:`` should be quoted.
z # Keep the existing /etc/apk/repositories file unaltered.
apk_repos:
preserve_repositories: true
z # Create repositories file for Alpine v3.12 main and community
# using default mirror site.
apk_repos:
alpine_repo:
community_enabled: true
version: 'v3.12'
a # Create repositories file for Alpine Edge main, community, and
# testing using a specified mirror site and also a local repo.
apk_repos:
alpine_repo:
base_url: 'https://some-alpine-mirror/alpine'
community_enabled: true
testing_enabled: true
version: 'edge'
local_repo_base_url: 'https://my-local-server/local-alpine'
apk_repos)idnametitledescriptiondistrosZexamples frequencyZactivate_by_schema_keys)r
cfgcloudargsreturnc C s |j d}|stjd| dS tj|ddr