Files
kayobe/ansible/inventory/group_vars/all/apt
Maksim Malchuk b4733da80a Add the ability to override the system's default repositories
Ubuntu 24.04 is the first release where package sources for Ubuntu are
stored in a `.sources` file called
`/etc/apt/sources.list.d/ubuntu.sources`, instead of the traditional
`sources.list`.

This means that we have lost the ability to override the system's
default repositories. Previously, we could use the
`apt_disable_sources_list` setting to disable default repositories and
provide our own using `apt_repositories`. However, this is no longer
possible.

Now, each element of `apt_repositories` contains a field called `name`,
which specifies the name of the repository file (without the `.sources`
suffix). The default value of this field is `kayobe` and it may be
omitted. The user can override the default by providing a different
name, such as `ubuntu`, and new repository data. This way, the default
file, `/etc/apt/source.list.d/ubuntu.sources`, will be overwritten by
the provided repository configuration.

Closes-Bug: #2107280
Change-Id: Ieaa1f56de7579ff5f989b207e29de29e148086be
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2025-05-14 12:50:20 +02:00

67 lines
2.6 KiB
Plaintext

---
###############################################################################
# Apt package manager configuration.
# Apt cache TTL in seconds. Default is 3600.
apt_cache_valid_time: 3600
# Apt proxy URL for HTTP. Default is empty (no proxy).
apt_proxy_http:
# Apt proxy URL for HTTPS. Default is {{ apt_proxy_http }}.
apt_proxy_https: "{{ apt_proxy_http }}"
# List of Apt configuration options. Each item is a dict with the following
# keys:
# * content: free-form configuration file content
# * filename: name of a file in /etc/apt/apt.conf.d/ in which to write the
# configuration
# Default is an empty list.
apt_config: []
# List of apt keys. Each item is a dict containing the following keys:
# * url: URL of key
# * filename: Name of a file in which to store the downloaded key. The
# extension should be '.asc' for ASCII-armoured keys, or '.gpg' otherwise.
# Default is an empty list.
apt_keys: []
# A list of Apt repositories. Each item is a dict with the following keys:
# * name: the <name>.sources filename part. Optional. Default is 'kayobe' and
# the default filename is 'kayobe.sources'.
# * types: whitespace-separated list of repository types, e.g. deb or deb-src
# (optional, default is 'deb')
# * url: URL of the repository
# * suites: whitespace-separated list of suites, e.g. noble (optional, default
# is ansible_facts.distribution_release)
# * components: whitespace-separated list of components, e.g. main (optional,
# default is 'main')
# * signed_by: whitespace-separated list of names of GPG keyring files in
# apt_keys_path (optional, default is unset)
# * architecture: whitespace-separated list of architectures that will be used
# (optional, default is unset)
# Default is an empty list.
apt_repositories: []
# List of Apt preferences options. Each item is a dict with the following
# keys:
# * content: free-form preferences file content
# * filename: name of a file in /etc/apt/preferences.d/ in which to write
# the configuration
# Default is an empty list.
apt_preferences: []
# Whether to disable repositories in /etc/apt/sources.list. This may be used
# when replacing the distribution repositories via apt_repositories.
# Default is false.
apt_disable_sources_list: false
# List of Apt auth configurations. Each item is a dict with the following keys:
# * machine: 'machine' entry in the auth file
# * login: 'login' entry in the auth file
# * password: 'password' entry in the auth file
# * filename: Name of a file in /etc/apt/auth.conf.d in which to store
# the auth configuration. The extension should be ``.conf``.
# Default is an empty list.
apt_auth: []