summaryrefslogtreecommitdiff
path: root/doc/examples/cloud-config.txt
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-12 16:27:50 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-05-12 16:27:50 +0200
commit3be3e7452410d97ef9f9d4b525fa828de1f57bc0 (patch)
tree848b1670addff6d2fe2b5886f6e45779aae75de5 /doc/examples/cloud-config.txt
parent0d8bf6f2c1464b5f4dab735841a50d02016d2caf (diff)
downloadvyos-cloud-init-3be3e7452410d97ef9f9d4b525fa828de1f57bc0.tar.gz
vyos-cloud-init-3be3e7452410d97ef9f9d4b525fa828de1f57bc0.zip
Document apt_custom_sources_list in examples
Diffstat (limited to 'doc/examples/cloud-config.txt')
-rw-r--r--doc/examples/cloud-config.txt30
1 files changed, 30 insertions, 0 deletions
diff --git a/doc/examples/cloud-config.txt b/doc/examples/cloud-config.txt
index f84d526d..75a4b6d4 100644
--- a/doc/examples/cloud-config.txt
+++ b/doc/examples/cloud-config.txt
@@ -72,6 +72,36 @@ apt_pipelining: False
# then apt_mirror above will have no effect
apt_preserve_sources_list: true
+# Provide a custom template for rednering sources.list
+# Default: a default template for Ubuntu/Debain will be used as packaged in
+# Ubuntu: /etc/cloud/templates/sources.list.ubuntu.tmpl
+# Debian: /etc/cloud/templates/sources.list.debian.tmpl
+# Others: n/a
+# This will follow the normal mirror/codename replacement rules before
+# being written to disk.
+apt_custom_sources_list: |
+ ## template:jinja
+ ## Note, this file is written by cloud-init on first boot of an instance
+ ## modifications made here will not survive a re-bundle.
+ ## if you wish to make changes you can:
+ ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
+ ## or do the same in user-data
+ ## b.) add sources in /etc/apt/sources.list.d
+ ## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
+ deb {{mirror}} {{codename}} main restricted
+ deb-src {{mirror}} {{codename}} main restricted
+
+ # could drop some of the usually used entries
+
+ # could refer to other mirrors
+ deb http://ddebs.ubuntu.com {{codename}} main restricted universe multiverse
+ deb http://ddebs.ubuntu.com {{codename}}-updates main restricted universe multiverse
+ deb http://ddebs.ubuntu.com {{codename}}-proposed main restricted universe multiverse
+
+ # or even more uncommon examples like local or NFS mounted repos,
+ # eventually whatever is compatible with sources.list syntax
+ deb file:/home/apt/debian unstable main contrib non-free
+
# 'source' entries in apt-sources that match this python regex
# expression will be passed to add-apt-repository
add_apt_repo_match: '^[\w-]+:\w'