aptcacherng

pdk
Install and configure an apt-cacher-ng server.

Jascha Sticher

itbane

2,609 downloads

2,609 latest version

5.0 quality score

Version information

  • 1.0.3 (latest)
released Sep 27th 2019
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 7.0.0
  • Debian

Start using this module

Documentation

itbane/aptcacherng — version 1.0.3 Sep 27th 2019

aptcacherng

Table of Contents

  1. Overview
  2. Setup
  3. Usage
  4. Limitations
  5. Development

Overview

A puppet module to manage an apt-cacher-ng service and its configuration. Applying aptcacherng to a node will configure the node to act as a caching proxy for apt (and other) package management systems.

Setup

What aptcacherng affects

Use of aptcacherng causes installation of the apt-cacher-ng package, generation of the config file /etc/apt-cacher-ng/acng.conf, and the apt-cacher-ng service to run and be enabled.

Beginning with aptcacherng

Quickest way to get an apt caching proxy using defaults:

include aptcacherng

This will apply all resources and leave you with apt-cacher-ng running on port 3142.

Usage

Simply declaring the aptcacherng class for a node, will apply the class using standard apt-cacher-ng defaults:

  • CacheDir: /var/cache/apt-cacher-ng
  • LogDir: /var/log/apt-cacher-ng
  • Port: 3142
  • ReportPage: acng-report.html
  • ExTreshold: 4

All apt-cacher-ng config file directives are available as parameters to the aptcacherng class. For example, to change the directory where apt-cacher-ng will store its cache:

class {'aptcacherng':
    cachedir => '/data/apt/apt-cacher-ng'
}

Or, in a YAML hiera data source—for example—you could make use of automatic parameter lookups like so:

---
aptcacherng::cachedir: "/data/apt/apt-cacher-ng"

If you wish to make aptcacherng install a specific apt-cacher-ng package, you may pass the package_name string parameter when declaring the class.

If you're using the puppetlabs-apt module, telling apt to use your apt-cacher-ng service is simple. For example:

class {'apt':
    proxy_host => 'server.name.com',
    proxy_port => '3142',
}

Limitations

Only debian based distributions are currently supported.

Development

Development takes place in the puppet-aptcacherng GitHub repository. Pull Requests happily accepted.

Original Work at (https://github.com/markhellewell/aptcacherng). Forked due to missing repo.