diff --git a/README.md b/README.md index f87f5c1..ef86708 100644 --- a/README.md +++ b/README.md @@ -1 +1,24 @@ -# TODO \ No newline at end of file +# tobias_richter.apt_config + +[![Build Status](https://travis-ci.org/tobias-richter/ansible-apt-config.svg?branch=master)](https://travis-ci.org/tobias-richter/ansible-apt-config) + +This roles configures apt sources, preferences and apt-cacher-ng / proxy for Debian and Ubuntu. + +## Requirements + +This role requires Ansible 2.7 or higher. + +## Role Variables + +See [defaults/main.yml](defaults/main.yml) for the documented role variables. +See also the distribution specific [vars](vars). + + +## Example Playbook + +This playbook configures apt together with a proxy server / apt-cacher-ng. + + - hosts: apt_config + roles: + - role: tobias_richter.apt_config + apt_config_apt_cacher_ng: http://apt-cacher-ng.main.corp \ No newline at end of file diff --git a/defaults/main.yml b/defaults/main.yml index 866fd41..9d67ed9 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,10 +1,15 @@ -# use apt-cacher-ng when defined +# configure apt-cacher-ng when defined # apt_config_apt_cacher_ng: +# Path to sources.list apt_config_sources_list_path: /etc/apt/sources.list # distribution release apt_config_distribution_release: "{{ ansible_distribution_release }}" -_apt_config_components_custom: "{{ apt_config_components_custom | default([]) }}" -apt_config_components: "{{ apt_config_components_default | union(_apt_config_components_custom) }}" \ No newline at end of file +# custom componens +apt_config_components_custom: [] +# e.g. +# - rpimain + +apt_config_components: "{{ apt_config_components_default | union(apt_config_components_custom) }}" \ No newline at end of file diff --git a/vars/default.yml b/vars/default.yml index 9faa770..5f88df3 100644 --- a/vars/default.yml +++ b/vars/default.yml @@ -1,3 +1,4 @@ +# default debs to configure apt_config_debs: - uri: http://ftp.debian.org/debian suite: "{{ apt_config_distribution_release }}" @@ -8,6 +9,7 @@ apt_config_debs: - uri: http://ftp.debian.org/debian suite: "{{ apt_config_distribution_release }}-backports" +# default components apt_config_components_default: - main - contrib diff --git a/vars/distribution_Ubuntu.yml b/vars/distribution_Ubuntu.yml index f0a2487..3c48a10 100644 --- a/vars/distribution_Ubuntu.yml +++ b/vars/distribution_Ubuntu.yml @@ -1,3 +1,4 @@ +# Ubuntu debs apt_config_debs: - uri: http://archive.ubuntu.com/ubuntu suite: "{{ apt_config_distribution_release }}" @@ -8,6 +9,7 @@ apt_config_debs: - uri: http://archive.ubuntu.com/ubuntu suite: "{{ apt_config_distribution_release }}-backports" +# Default ubuntu components apt_config_components_default: - main - restricted diff --git a/vars/lsb_id_Raspbian.yml b/vars/lsb_id_Raspbian.yml index d2eebe9..9069589 100644 --- a/vars/lsb_id_Raspbian.yml +++ b/vars/lsb_id_Raspbian.yml @@ -1,9 +1,10 @@ +# Raspbian debs apt_config_debs: - uri: http://raspbian.raspberrypi.org/raspbian suite: "{{ apt_config_distribution_release }}" +# Raspbian components apt_config_components_default: - main - contrib - - non-free -# - rpimain \ No newline at end of file + - non-free \ No newline at end of file