Getting started
Conflicts with other APT sources
Some packages from third-party repositories, for example Google Chrome, may
install their own /etc/apt/sources.list.d/*.list
configuration files on
installation. This might result in a conflict, since extrepo
.sources
files define a specific GPG key for each external APT source.
You might see an error message while running apt update, for
example:
E: Conflicting values set for option Signed-By regarding source
http://dl.google.com/linux/chrome/deb/ stable:
/var/lib/extrepo/keys/google_chrome.asc !=
E: The list of sources could not be read.
There's currently nothing the debops.extrepo role can do about this. To fix these issues, you might need to comment out the additional APT sources installed by the software package. Some third-party packages support this situation and don't re-create the APT sources, others might not. YMMV.
Example inventory
To install and configure extrepo
on a given host, it should be included in
a specific Ansible inventory group:
[debops_all_hosts]
hostname
[debops_service_extrepo]
hostname
By default the role does not enable any APT sources. Users can do that via
Ansible inventory using the extrepo__*_sources
variables. Other Ansible roles can also interface with the
debops.extrepo role through the extrepo__dependent_sources
variable used on the playbook level.
The repository components enabled by extrepo (main
, contrib
,
non-free
, etc.) are set using the ansible_local.apt.components
Ansible
local fact. You can use the debops.apt role to enable non-free
components
which might be needed for certain repositories, for
example FastTrack repository with packaged GitLab.
To pick a specific version of a package from the APT repository, you can use the debops.apt_preferences role.
Example playbook
If you are using this role without DebOps, here's an example Ansible playbook
that uses the debops.extrepo
role:
---
- name: Manage external APT sources
collections: [ 'debops.debops', 'debops.roles01',
'debops.roles02', 'debops.roles03' ]
hosts: [ 'debops_service_extrepo' ]
become: True
environment: '{{ inventory__environment | d({})
| combine(inventory__group_environment | d({}))
| combine(inventory__host_environment | d({})) }}'
roles:
- role: extrepo
tags: [ 'role::extrepo', 'skip::extrepo' ]
Other resources
List of other useful resources related to the debops.extrepo
Ansible role:
Manual pages: extrepo(1p), sources.list(5)
Blog post about some of the APT repositories available through extrepo
The extrepo-data repository which contains metadata about third-party APT sources