Version information
This version is compatible with:
- ,
Start using this module
Add this module to your Puppetfile:
mod 'markhellewell-aptcacherng', '1.0.1'
Learn more about managing modules with a PuppetfileDocumentation
aptcacherng
Table of Contents
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.
1.0.1
Features:
- Support for setting of max. no. files on Linux
1.0.0
Fixes:
- All the things
0.1.7
Features:
- Service parameters
- Tests for puppet 3.6
- Workaround for bug in newer apt-cacher-ng package
0.1.6
Features:
- Tests and puppet documentation
0.1.5
Features:
- Support management of security.conf
0.1.4
Fixes:
- Puppet 3.4 compatibility fix
0.1.3
Features:
- Create (or ensure existance of)
CacheDir
andLogDir
.
Copyright (c) 2013, Mark Hellewell All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.