Add a $key_options parameter, which need to work apt-key via proxy.
[puppet-modules/puppetlabs-apt.git] / README.md
1 # Apt module for Puppet
2
3 ## Description
4 Provides helpful definitions for dealing with Apt.
5
6 ## Usage
7
8 ### apt:builddep
9 Install the build depends of a specified package.
10 <pre>
11 apt::builddep { "glusterfs-server": }
12 </pre>
13
14 ### apt::force
15 Force a package to be installed from a specific release.  Useful when using repositories like Debian unstable in Ubuntu.
16 <pre>
17 apt::force { "glusterfs-server":
18         release => "unstable",
19         version => '3.0.3',
20         require => Apt::Source["debian_unstable"],
21 }
22 </pre>
23
24 ### apt::pin
25 Add an apt pin for a certain release.
26 <pre>
27 apt::pin { "karmic": priority => 700 }
28 apt::pin { "karmic-updates": priority => 700 }
29 apt::pin { "karmic-security": priority => 700 }
30 </pre>
31
32 ### apt::ppa
33 Add a ppa repository using `add-apt-repository`.  Somewhat experimental.
34 <pre>
35 apt::ppa { "ppa:drizzle-developers/ppa": }
36 </pre>
37
38 ### apt::release
39 Set the default apt release.  Useful when using repositories like Debian unstable in Ubuntu.
40 <pre>
41 apt::release { "karmic": }
42 </pre>
43
44 ### apt::source
45 Add an apt source to `/etc/apt/sources.list.d/`.
46 <pre>
47 apt::source { "debian_unstable":
48   location          => "http://debian.mirror.iweb.ca/debian/",
49   release           => "unstable",
50   repos             => "main contrib non-free",
51   required_packages => "debian-keyring debian-archive-keyring",
52   key               => "55BE302B",
53   key_server        => "subkeys.pgp.net",
54   pin               => "-10",
55   include_src       => true
56 }
57 </pre>
58
59 This source will configure your system for the Puppet Labs APT repository.
60 <pre>
61 apt::source { 'puppetlabs':
62   location   => 'http://apt.puppetlabs.com',
63   repos      => 'main',
64   key        => '4BD6EC30',
65   key_server => 'pgp.mit.edu',
66 }
67 </pre>
68
69 ### apt::key
70 Add a key to the list of keys used by apt to authenticate packages.
71 <pre>
72 apt::key { "puppetlabs":
73   key        => "4BD6EC30",
74   key_server => "pgp.mit.edu",
75 }
76 </pre>
77
78 <pre>
79 apt::key { "jenkins":
80   key        => "D50582E6",
81   key_source => "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key",
82 }
83 </pre>
84
85 Note that use of the "key_source" parameter requires wget to be installed and working.
86
87
88 ## Contributors
89 A lot of great people have contributed to this module. A somewhat current list follows.  
90 Ben Godfrey <ben.godfrey@wonga.com>  
91 Christian G. Warden <cwarden@xerus.org>  
92 Dan Bode <bodepd@gmail.com> <dan@puppetlabs.com>  
93 Garrett Honeycutt <github@garretthoneycutt.com>  
94 Jeff Wallace <jeff@evolvingweb.ca> <jeff@tjwallace.ca>  
95 Ken Barber <ken@bob.sh>  
96 Matthaus Litteken <matthaus@puppetlabs.com> <mlitteken@gmail.com>  
97 Matthias Pigulla <mp@webfactory.de>  
98 Monty Taylor <mordred@inaugust.com>  
99 Peter Drake <pdrake@allplayers.com>  
100 Reid Vandewiele <marut@cat.pdx.edu>  
101 Robert Navarro <rnavarro@phiivo.com>  
102 Ryan Coleman <ryan@puppetlabs.com>  
103 Scott McLeod <scott.mcleod@theice.com>  
104 Spencer Krum <spencer@puppetlabs.com>  
105 William Van Hevelingen <blkperl@cat.pdx.edu> <wvan13@gmail.com>  
106 Zach Leslie <zach@puppetlabs.com>