Setup backports repository for Debian and Ubuntu
Adds backports repository for Debian and Ubuntu.
Note for Debian users: Debian provides backports only for the latest stable version.
The project has reached a stable, usable state but the author(s) have ceased all work on it. See Similar Roles section for alternatives.
Install via Galaxy:
ansible-galaxy install jnv.debian-backports
In your playbook:
- hosts: all
roles:
# ...
- jnv.debian-backports
The role uses apt_repository module which has additional requirements.
You can use default_release
option for apt module to install package from backports. For example:
tasks:
- apt: name=mosh state=present default_release={{ansible_distribution_release}}-backports
ansible_distribution_release
variable contains release name, i.e. precise
or wheezy
.
backports_uri
: URI of the backports repository; change this if you want to use a particular mirror.https://deb.debian.org/debian
http://archive.ubuntu.com/ubuntu
backports_components
: Release and components for sources.list{{ backports_distribution }}-backports backports main contrib non-free
{{ backports_distribution }}-backports main restricted universe multiverse
backports_state
: Whether the backports repository should be used; default 'present'
, change to 'absent'
to disable the role.backports_priority_enabled
: Whether to enable backports priority (APT pinning); default false
.backports_priority
: Set pin priority for the backports repository; default 100
. See more at AptConfiguration
page.For developing and testing this role Github Actions, Molecule and Vagrant is used.
In a local environment environment you can easily test the role with
pip3 install molecule-vagrant ansible-lint yamllint
molecule test
This requires Vagrant to be installed.