-
Notifications
You must be signed in to change notification settings - Fork 909
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apt: Add deb822 format support for disable_suites in user-data
Provide two new functions to handle disabling deb822 format files disable_suites_deb822 and disable_deb822_section_without_suites. When features.APT_DEB822_SOURCE_LIST_FILE is set, deb822 format apt sources will be rendered and written to /etc/apt/source.list.d/. A deb822 source file can have suites defined in a single entry: Types: deb URIs: https://ppa.launchpadcontent.net/something Suites: mantic mantic-updates Components: main When disable_suites matches any suite in a deb822 source, disable_suites_deb822 will preserve the original Suites line as a comment and redact any active configured Suites from the commented line. The result when user-data provides disable_suites: [mantic] is: Types: deb URIs: https://ppa.launchpadcontent.net/something # cloud-init disable_suites redacted: Suites: mantic mantic-updates Suites: mantic Components: main If all applicable Suites are disabled by cloud-init for an entry, cloud-init will disabled the entire entry like the following: ## Entry disabled by cloud-init, due to disable_suites # disabled by cloud-init: Types: deb # disabled by cloud-init: URIs: https://ppa.launchpadcontent.net/... # disabled by cloud-init: Suites: mantic mantic-updates # disabled by cloud-init: Components: main
- Loading branch information
1 parent
2f510be
commit a81abef
Showing
2 changed files
with
170 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters