Description

Provides useful configuration options for Debian-based systems.

Requirements

Platform

  • Debian

Attributes

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":        "http://ftp.us.debian.org/debian"
  }
}

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
}]

Usage

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 o=apt.postgresql.org'}],
  sources: [{
    archive: 'squeeze-pgdg',
    key:     'http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc',
    url:     'http://apt.postgresql.org/pub/repos/apt'
  }]
}