X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=README.md;h=ec8b4c5e49bf5ace6461338a2b4fb04c3a5d4809;hb=1210d390d8a1b7491a7cde19bd309a0c43a44d0a;hp=705cb33de5be1eac3c9995fa7c893a77c5f1004f;hpb=bd6830278391253d17e8f1991ea0ab6df8080502;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/README.md b/README.md index 705cb33..ec8b4c5 100644 --- a/README.md +++ b/README.md @@ -1,106 +1,236 @@ -# Apt module for Puppet +apt +=== + +[![Build Status](https://travis-ci.org/puppetlabs/puppetlabs-apt.png?branch=master)](https://travis-ci.org/puppetlabs/puppetlabs-apt) ## Description + Provides helpful definitions for dealing with Apt. -## Usage +======= + +Overview +-------- + +The APT module provides a simple interface for managing APT source, key, and definitions with Puppet. + +Module Description +------------------ + +APT automates obtaining and installing software packages on \*nix systems. + +Setup +----- + +**What APT affects:** + +* package/service/configuration files for APT +* your system's `sources.list` file and `sources.list.d` directory + * NOTE: Setting the `purge_sources_list` and `purge_sources_list_d` parameters to 'true' will destroy any existing content that was not declared with Puppet. The default for these parameters is 'false'. +* system repositories +* authentication keys +* wget (optional) + +### Beginning with APT + +To begin using the APT module with default parameters, declare the class + + include apt + +Puppet code that uses anything from the APT module requires that the core apt class be declared/\s\+$//e + +Usage +----- + +Using the APT module consists predominantly in declaring classes that provide desired functionality and features. + +### apt + +`apt` provides a number of common resources and options that are shared by the various defined types in this module, so you MUST always include this class in your manifests. + +The parameters for `apt` are not required in general and are predominantly for development environment use-cases. -### apt:builddep -Install the build depends of a specified package. -
-apt::builddep { "glusterfs-server": } -+ class { 'apt': + always_apt_update => false, + disable_keys => undef, + proxy_host => false, + proxy_port => '8080', + purge_sources_list => false, + purge_sources_list_d => false, + purge_preferences_d => false, + update_timeout => undef + } + +Puppet will manage your system's `sources.list` file and `sources.list.d` directory but will do its best to respect existing content. + +If you declare your apt class with `purge_sources_list` and `purge_sources_list_d` set to 'true', Puppet will unapologetically purge any existing content it finds that wasn't declared with Puppet. + +### apt::builddep + +Installs the build depends of a specified package. + + apt::builddep { 'glusterfs-server': } ### apt::force -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"], -} -+ +Forces a package to be installed from a specific release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu. + + apt::force { 'glusterfs-server': + release => 'unstable', + version => '3.0.3', + require => Apt::Source['debian_unstable'], + } + +### apt::key + +Adds a key to the list of keys used by APT to authenticate packages. + + apt::key { 'puppetlabs': + key => '4BD6EC30', + key_server => 'pgp.mit.edu', + } + + apt::key { 'jenkins': + key => 'D50582E6', + key_source => 'http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key', + } + +Note that use of `key_source` requires wget to be installed and working. ### apt::pin -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 } -+ +Adds an apt pin for a certain release. + + apt::pin { 'karmic': priority => 700 } + apt::pin { 'karmic-updates': priority => 700 } + apt::pin { 'karmic-security': priority => 700 } + +Note you can also specifying more complex pins using distribution properties. + + apt::pin { 'stable': + priority => -10, + originator => 'Debian', + release_version => '3.0', + component => 'main', + label => 'Debian' + } ### apt::ppa -Add a ppa repository using `add-apt-repository`. Somewhat experimental. -
-apt::ppa { "ppa:drizzle-developers/ppa": } -+ +Adds a ppa repository using `add-apt-repository`. + + apt::ppa { 'ppa:drizzle-developers/ppa': } ### apt::release -Set the default apt release. Useful when using repositories like Debian unstable in Ubuntu. -
-apt::release { "karmic": } -+ +Sets the default apt release. This class is particularly useful when using repositories, like Debian, that are unstable in Ubuntu. + + class { 'apt::release': + release_id => 'precise', + } ### apt::source -Add an apt source to `/etc/apt/sources.list.d/`. -
-apt::source { "debian_unstable": - location => "http://debian.mirror.iweb.ca/debian/", - release => "unstable", - repos => "main contrib non-free", - required_packages => "debian-keyring debian-archive-keyring", - key => "55BE302B", - key_server => "subkeys.pgp.net", - pin => "-10", - include_src => true -} -- -This source will configure your system for the Puppet Labs APT repository. -
-apt::source { 'puppetlabs': - location => 'http://apt.puppetlabs.com', - repos => 'main', - key => '4BD6EC30', - key_server => 'pgp.mit.edu', -} --### apt::key -Add a key to the list of keys used by apt to authenticate packages. -
-apt::key { "puppetlabs": - key => "4BD6EC30", - key_server => "pgp.mit.edu", -} -- -
-apt::key { "jenkins": - key => "D50582E6", - key_source => "http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key", -} -- -Note that use of the "key_source" parameter requires wget to be installed and working. - - -## Contributors -A lot of great people have contributed to this module. A somewhat current list follows. -Ben Godfrey