Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-richter committed Jun 7, 2020
1 parent 9009ee8 commit 25ad055
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 6 deletions.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,24 @@
# TODO
# 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
11 changes: 8 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
@@ -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) }}"
# custom componens
apt_config_components_custom: []
# e.g.
# - rpimain

apt_config_components: "{{ apt_config_components_default | union(apt_config_components_custom) }}"
2 changes: 2 additions & 0 deletions vars/default.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# default debs to configure
apt_config_debs:
- uri: http://ftp.debian.org/debian
suite: "{{ apt_config_distribution_release }}"
Expand All @@ -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
2 changes: 2 additions & 0 deletions vars/distribution_Ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Ubuntu debs
apt_config_debs:
- uri: http://archive.ubuntu.com/ubuntu
suite: "{{ apt_config_distribution_release }}"
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions vars/lsb_id_Raspbian.yml
Original file line number Diff line number Diff line change
@@ -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
- non-free

0 comments on commit 25ad055

Please sign in to comment.