From 7c3437cc44a9a958c9a3a713a3edd6ebde6d6678 Mon Sep 17 00:00:00 2001 From: Chad Smith Date: Thu, 14 Sep 2023 20:12:06 -0600 Subject: [PATCH] docs: apt_configure represent deb822 sources behavior and example --- cloudinit/config/cc_apt_configure.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/cloudinit/config/cc_apt_configure.py b/cloudinit/config/cc_apt_configure.py index a84053b07b95..c89ea45f7cf9 100644 --- a/cloudinit/config/cc_apt_configure.py +++ b/cloudinit/config/cc_apt_configure.py @@ -51,6 +51,10 @@ cloud-init's distro support for instructions on using these config options. + In cloud-init 23.4 or later, cloud-init will generate default + apt sources information in deb822 format at + :file:`/etc/apt/sources.list.d/.sources`. + .. note:: To ensure that apt configuration is valid yaml, any strings containing special characters, especially ``:`` should be quoted. @@ -127,7 +131,21 @@ ------BEGIN PGP PUBLIC KEY BLOCK------- ------END PGP PUBLIC KEY BLOCK-------""" - ) + ), + dedent( + """\ + # cloud-init version 23.4 will generate a deb822 formatted sources + # file at /etc/apt/sources.list.d/.sources instead of + # /etc/apt/sources.list when `sources_list` content is deb822 + # format. + apt: + sources_list: | + Types: deb + URIs: http://archive.ubuntu.com/ubuntu/ + Suites: $RELEASE + Components: main + """ + ), ], "frequency": frequency, "activate_by_schema_keys": [],