Giter Site home page Giter Site logo

ansible-role-debian-backports's Introduction

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:

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.

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

pip3 install molecule-vagrant ansible-lint yamllint
molecule test

This requires Vagrant to be installed.

ansible-role-debian-backports's People

Contributors

jade-42 avatar jnv avatar nevart avatar praseodym avatar sfuerte avatar t2d avatar xshadow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ansible-role-debian-backports's Issues

Add Pin-Priority support

By default backports have lower priority but possible to increase it via APT preferences.
Any possibility to add support for it?

Similar / alternative roles?

Comment here with any roles which cover the use case of enabling backports repository in Debian-based systems. I might add them to the list.

Bonus points for roles with compatible API. ๐Ÿ˜‰

Variables cannot be overridden

The variables defined in vars/Debian.yml and vars/Ubuntu.yml apparently have a higher precedence than variables defined in the hosts playbook; seems like a weird Ansible design choice to me. This means that backports_uri cannot be easily overridden.

Creating a file named defaults/main.yml seems most common way to fix this, but I'm not sure how to make this OS-dependant.

Override of `backports_uri` fails

Thanks for handling of #12, I think the chosen path makes sense.

While trying to override backports_uri, to opt-in to use HTTPS on a Debian system, via group_vars, I ran into a problem: the override doesn't have any effect.

After looking again into the docs, the precedence of include_vars, as used in the code is higher than most of the other mechanisms to provide variables, including group_vars.

Any idea how to deal with this? Is there an alternative we could make use of in this role, to load OS-specific variables, while still keeping the ability to override them?

v0.4.1 missing on ansible-galaxy

The latest version/tag of this role is missing on ansible galaxy

Please let ansible galaxy rescan the github repository, then the version should be listed and used.

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.