
This change adds support for configuration of Apt package manager in /etc/apt/apt.conf.d/. This allows adding arbitrary global configuration options for Apt. Options can be added in different files, allowing for different filename-based priorities. CI tests and documentation are provided. Story: 2009655 Task: 43987 Change-Id: I9d7d18851359e97cd01b4c2287bf79110796b25a
24 lines
629 B
YAML
24 lines
629 B
YAML
---
|
|
# NOTE(mgoddard): Use the modern deb822 repository format rather than the old
|
|
# format used by the apt_repository module.
|
|
- name: Configure apt repositories
|
|
template:
|
|
src: "kayobe.sources.j2"
|
|
dest: "/etc/apt/sources.list.d/kayobe.sources"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
become: true
|
|
notify:
|
|
- Update apt cache
|
|
|
|
- name: Disable repositories in /etc/apt/sources.list
|
|
replace:
|
|
# Make a backup, in case we end up with a broken configuration.
|
|
backup: true
|
|
path: /etc/apt/sources.list
|
|
regexp: '^(deb.*)'
|
|
replace: '# \1'
|
|
when: apt_disable_sources_list | bool
|
|
become: true
|