Forge Home

aptcacherng

Install and configure an apt-cacher-ng server.

80,256 downloads

41,960 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.0.1 (latest)
  • 1.0.0
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.3
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Mar 28th 2016
This version is compatible with:
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'markhellewell-aptcacherng', '1.0.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add markhellewell-aptcacherng
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install markhellewell-aptcacherng --version 1.0.1

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

markhellewell/aptcacherng — version 1.0.1 Mar 28th 2016

aptcacherng

Puppet Forge Version Puppet Forge Downloads Build Status Puppet Forge Score

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:

class {'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:

---
classes:
  - aptcacherng

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

If you wish to make aptcacherng install a specific apt-cacher-ng package, you may pass the packagename 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.