reformatted whitespace to match recommended style

of 2 space indentation.
This commit is contained in:
Dan Bode 2011-05-30 10:24:06 -07:00
parent 27ebdfc57f
commit 77d2b0dd05
8 changed files with 108 additions and 107 deletions

View file

@ -2,20 +2,20 @@
class apt::debian::testing {
# deb http://debian.mirror.iweb.ca/debian/ testing main contrib non-free
# deb-src http://debian.mirror.iweb.ca/debian/ testing main contrib non-free
# Key: 55BE302B Server: subkeys.pgp.net
# debian-keyring
# debian-archive-keyring
apt::source { "debian_testing":
location => "http://debian.mirror.iweb.ca/debian/",
release => "testing",
repos => "main contrib non-free",
required_packages => "debian-keyring debian-archive-keyring",
key => "55BE302B",
key_server => "subkeys.pgp.net",
pin => "-10"
}
# deb http://debian.mirror.iweb.ca/debian/ testing main contrib non-free
# deb-src http://debian.mirror.iweb.ca/debian/ testing main contrib non-free
# Key: 55BE302B Server: subkeys.pgp.net
# debian-keyring
# debian-archive-keyring
apt::source { "debian_testing":
location => "http://debian.mirror.iweb.ca/debian/",
release => "testing",
repos => "main contrib non-free",
required_packages => "debian-keyring debian-archive-keyring",
key => "55BE302B",
key_server => "subkeys.pgp.net",
pin => "-10"
}
}

View file

@ -2,20 +2,20 @@
class apt::debian::unstable {
# deb http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free
# deb-src http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free
# Key: 55BE302B Server: subkeys.pgp.net
# debian-keyring
# debian-archive-keyring
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"
}
# deb http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free
# deb-src http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free
# Key: 55BE302B Server: subkeys.pgp.net
# debian-keyring
# debian-archive-keyring
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"
}
}

View file

@ -2,15 +2,15 @@
# force a package from a specific release
define apt::force(
$release = 'testing',
$version = false
$release = 'testing',
$version = false
) {
exec { "/usr/bin/aptitude -y -t ${release} install ${name}":
unless => $version ? {
false => "/usr/bin/dpkg -l | grep ${name}",
default => "/usr/bin/dpkg -l | grep ${name} | grep ${version}"
}
}
exec { "/usr/bin/aptitude -y -t ${release} install ${name}":
unless => $version ? {
false => "/usr/bin/dpkg -l | grep ${name}",
default => "/usr/bin/dpkg -l | grep ${name} | grep ${version}"
}
}
}

View file

@ -28,20 +28,20 @@ class apt(
package { "python-software-properties": }
file { "sources.list":
ensure => present,
owner => root,
group => root,
mode => 644,
}
file { "sources.list":
name => "${apt::params::root}/sources.list",
ensure => present,
owner => root,
group => root,
mode => 644,
}
file { "sources.list.d":
ensure => directory,
owner => root,
group => root,
}
file { "sources.list.d":
name => "${apt::params::root}/sources.list.d",
ensure => directory,
owner => root,
group => root,
}
exec { "apt_update":
command => "${apt::params::provider} update",

View file

@ -2,18 +2,18 @@
# pin a release in apt, useful for unstable repositories
define apt::pin(
$packages = '*',
$priority = 0
$packages = '*',
$priority = 0
) {
file { "${name}.pref":
ensure => file,
owner => root,
group => root,
mode => 644,
content => "# ${name}\nPackage: ${packages}\nPin: release a=${name}\nPin-Priority: ${priority}",
}
include apt::params
file { "${name}.pref":
name => "${apt::params::root}/preferences.d/${name}",
ensure => file,
owner => root,
group => root,
mode => 644,
content => "# ${name}\nPackage: ${packages}\nPin: release a=${name}\nPin-Priority: ${priority}",
}
}

View file

@ -4,14 +4,14 @@ define apt::ppa() {
Class['apt'] -> Apt::Ppa[$title]
exec { "apt-update-${name}":
command => "/usr/bin/aptitude update",
refreshonly => true,
}
exec { "apt-update-${name}":
command => "/usr/bin/aptitude update",
refreshonly => true,
}
exec { "add-apt-repository-${name}":
command => "/usr/bin/add-apt-repository ${name}",
notify => Exec["apt-update-${name}"],
}
exec { "add-apt-repository-${name}":
command => "/usr/bin/add-apt-repository ${name}",
notify => Exec["apt-update-${name}"],
}
}

View file

@ -4,12 +4,12 @@ class apt::release (
$release_id
) {
owner => root,
group => root,
mode => 644,
}
include apt::params
file { "${apt::params::root}/apt.conf.d/01release":
owner => root,
group => root,
mode => 644,
content => "APT::Default-Release \"${release_id}\";"
}
}

View file

@ -2,48 +2,49 @@
# add an apt source
define apt::source(
$location = '',
$release = 'karmic',
$repos = 'main',
$include_src = true,
$required_packages = false,
$key = false,
$key_server = 'keyserver.ubuntu.com',
$pin = false
$location = '',
$release = 'karmic',
$repos = 'main',
$include_src = true,
$required_packages = false,
$key = false,
$key_server = 'keyserver.ubuntu.com',
$pin = false
) {
file { "${name}.list":
ensure => file,
owner => root,
group => root,
mode => 644,
content => template("apt/source.list.erb"),
}
if $pin != false {
apt::pin { "${release}": priority => "${pin}" }
}
exec { "${name} apt update":
subscribe => File["${name}.list"],
refreshonly => true,
}
if $required_packages != false {
subscribe => File["${name}.list"],
refreshonly => true,
}
}
if $key != false {
exec { "/usr/bin/apt-key adv --keyserver ${key_server} --recv-keys ${key}":
unless => "/usr/bin/apt-key list | grep ${key}",
before => File["${name}.list"],
}
}
include apt::params
file { "${name}.list":
name => "${apt::params::root}/sources.list.d/${name}.list",
ensure => file,
owner => root,
group => root,
mode => 644,
content => template("apt/source.list.erb"),
}
if $pin != false {
apt::pin { "${release}": priority => "${pin}" }
}
exec { "${name} apt update":
command => "${apt::params::provider} update",
subscribe => File["${name}.list"],
refreshonly => true,
}
if $required_packages != false {
exec { "${apt::params::provider} -y install ${required_packages}":
subscribe => File["${name}.list"],
refreshonly => true,
}
}
if $key != false {
exec { "/usr/bin/apt-key adv --keyserver ${key_server} --recv-keys ${key}":
unless => "/usr/bin/apt-key list | grep ${key}",
before => File["${name}.list"],
}
}
}