Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Module for configuring Apt using Puppet.
Puppet Ruby Shell
Latest commit 8866014 @plathrop Add caveat to README

Don't Use This

Use the puppetlabs apt repo instead:

This is here purely for historical interest (and the fact that I'm still using it in production several places where I haven't had a chance to switch!)


Puppet module providing configuration for the apt package manager and apt-related resources. Currently only tested on Ubuntu.

Install into puppet module_path/apt

The module will automatically update your apt index every Puppet run.

Basic Usage

To add sources, use apt::source:

apt::source { 'site-testing-lucid':
    enable => true,
    url    => '';

PPAs can be added using apt::ppa:

apt::ppa { 'ppa:txwikinger/php5.2':
    ensure => 'present',

To add trusted apt keys, use apt::key:

apt::key { '1BB943DB':
    ensure    => present,
    keyserver => ''

To add apt preferences to /etc/apt/preferences.d:

apt::preference { 'backports-pin':
    ensure => present,
    source => 'puppet:///modules/site/backport-pin',

Apt Archives

To set up the directory structure and config file for an apt package archive, you can use the apt::archive defined type:

class { 'apt::archive::setup': }

apt::archive { '/repository':
    ensure => present,
    dists  => ['lucid'],
    owner  => 'www-data',
Something went wrong with that request. Please try again.