Forge Home

apt_cacher_ng

pdk
simple module to install and configure apt-cacher-ng

2,720 downloads

96 latest version

1.3 quality score

Version information

  • 0.1.2 (latest)
  • 0.1.1
  • 0.1.0
released Oct 30th 2024
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

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'frankvandamme-apt_cacher_ng', '0.1.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add frankvandamme-apt_cacher_ng
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install frankvandamme-apt_cacher_ng --version 0.1.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

frankvandamme/apt_cacher_ng — version 0.1.2 Oct 30th 2024

apt_cacher_ng

Table of Contents

  1. Description
  2. Usage - Configuration options and additional functionality
  3. Reference - An under-the-hood peek at what the module is doing and how
  4. Limitations - OS compatibility, etc.

Description

This module installs apt-cacher-ng by distribution package. It also creates the cache directory /var/cache/apt-cacher-ng and the apt-cacher-ng user.

What's the value over just using a package resource somewhere? Well, since we manage the cache directory, it gives you the opportunity to set up your own logic around using a separate partition for your cached files.

    Mount['/var/cache/apt-cacher-ng']
    ->
    File['/var/cache/apt-cacher-ng'] 

The File resource is defined in this module, the Mount is the thing you yourself could define outside this module. This works rather well with the puppetlabs-lvm module (tested v. 0.9.0).

Also, there is a hiera lookup in there for apt::proxy since that is an obvious thing to have in your apt configuration (when running the Puppetlabs apt module at least), in which case, the package is installed before the proxy is configured in apt, which would create an awkward chicken and egg problem.

Usage

include apt_cacher_ng

Reference

One main class, one parameter:

  • passthroughpattern: (optional) the one configuration parameter in apt-cacher-ng everyone seems to need at some point.

Limitations

Many! This is a really simple module that just creates a directory, a user, and installs a package with minimal configuration.