Provides useful configuration options for Debian-based systems.



  • Debian


Node attributes are placed under the debian namespace. It is recommended that you choose a different Debian mirror, if possible. The default configuration looks like:

"debian": {
  "apt_preferences": [],
  "packages":        [],
  "sources":         [],
  "mirror":          {
    "archive":    "stable",
    "components": ["main"],
    "url":        ""

The packages attribute should contain any packages you want installed on the system that are not managed by any other cookbook.

"packages": ["less", "man-db", "nano"]

The sources attribute contains APT repositories (besides the primary mirror repositories) for /etc/apt/sources.list. Both url and key are required attributes; url is the base URL for the repository, and key is the URL of the repository's signing key. For more information, consult the man page.

"sources": [{
  "archive":    "stable",
  "components": ["main"],
  "key":        null,
  "type":       "deb",
  "url":        null

The apt_preferences attribute contains advanced configuration options that are added to /etc/apt/preferences. Only pin is required; this contains the exact string to use on the Pin: line. For more information, consult the man page.

"apt_preferences": [{
  "package":      "*",
  "pin":          null,
  "pin_priority": 500


The following example adds the PostgreSQL APT repository to your sources and pins it with a priority of 500.

run_list    'recipe[debian]'

override_attributes debian: {
  apt_preferences: [{pin: 'release'}],
  sources: [{
    archive: 'squeeze-pgdg',
    key:     '',
    url:     ''