项目作者: jnv

项目描述 :
Setup backports repository for Debian and Ubuntu
高级语言: HTML
项目地址: git://github.com/jnv/ansible-role-debian-backports.git
创建时间: 2014-01-15T16:46:51Z
项目社区:https://github.com/jnv/ansible-role-debian-backports

开源协议:The Unlicense

下载


Debian/Ubuntu Backports with Ansible

Ansible Role: jnv.debian-backports
Build Status

Adds backports repository for Debian and Ubuntu.

Note for Debian users: Debian provides backports only for the latest stable version.

Project Status

Project Status: Unsupported

The project has reached a stable, usable state but the author(s) have ceased all work on it. See Similar Roles section for alternatives.

Usage

Install via Galaxy:

  1. ansible-galaxy install jnv.debian-backports

In your playbook:

  1. - hosts: all
  2. roles:
  3. # ...
  4. - 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:

  1. tasks:
  2. - apt: name=mosh state=present default_release={{ansible_distribution_release}}-backports

ansible_distribution_release variable contains release name, i.e. precise or wheezy.

Variables

  • backports_uri: URI of the backports repository; change this if you want to use a particular mirror.
    • Debian: https://deb.debian.org/debian
    • Ubuntu: http://archive.ubuntu.com/ubuntu
  • backports_components: Release and components for sources.list
    • Debian: {{ backports_distribution }}-backports backports main contrib non-free
    • Ubuntu: {{ 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.

Similar Roles

Testing

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

  1. pip3 install molecule-vagrant ansible-lint yamllint
  2. molecule test

This requires Vagrant to be installed.