Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Puppet module to help manage Apt

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Apt module for Puppet


Provides helpful definitions for dealing with Apt.



Install the build depends of a specified package.

apt::builddep { "glusterfs-server": }


Force a package to be installed from a specific release. Useful when using repositories like Debian unstable in Ubuntu.

apt::force { "glusterfs-server":
    release => "unstable",
    version => '3.0.3',
    require => Apt::Source["debian_unstable"],


Add an apt pin for a certain release.

apt::pin { "karmic": priority => 700 }
apt::pin { "karmic-updates": priority => 700 }
apt::pin { "karmic-security": priority => 700 }


Add a ppa repository using add-apt-repository. Somewhat experimental.

apt::ppa { "ppa:drizzle-developers/ppa": }


Set the default apt release. Useful when using repositories like Debian unstable in Ubuntu.

apt::release { "karmic": }


Add an apt source to /etc/apt/sources.list.d/.

apt::source { "debian_unstable":
  location          => "",
  release           => "unstable",
  repos             => "main contrib non-free",
  required_packages => "debian-keyring debian-archive-keyring",
  key               => "55BE302B",
  key_server        => "",
  pin               => "-10",
  include_src       => true


Add a key to the list of keys used by apt to authenticate packages.

apt::key { "puppetlabs":
  key        => "4BD6EC30",
  key_server => "",
apt::key { "jenkins":
  key        => "D50582E6",
  key_source => "",

Note that use of the "key_source" parameter requires wget to be installed and working.


Sets default parameters which will be used within class. You can use it to override repository locations if you have own mirrors for example. Instantiate this before you use any apt resources in puppet.

class { "apt::params":
    mirror_location => { "" => "http://myownmirror.fqdn/debian_mirror_iweb_ca",
                         "" => "http://myownmirror.fqdn/ftp_uk_debian_org" }

You can also set up the apt module whether to use sources from your mirror or public mirror. To rewrite deb-src to your own mirror instantiate apt::params with:

class { "apt::params":
    rewrite_source_mirror => true


A lot of great people have contributed to this module. A somewhat current list follows.
Ben Godfrey
Christian G. Warden
Dan Bode
Garrett Honeycutt
Jeff Wallace
Ken Barber
Matthaus Litteken
Matthias Pigulla
Monty Taylor
Peter Drake
Reid Vandewiele
Robert Navarro
Ryan Coleman
Scott McLeod
Spencer Krum
William Van Hevelingen
Zach Leslie

Something went wrong with that request. Please try again.