reformatted whitespace to match recommended style
of 2 space indentation.
This commit is contained in:
parent
27ebdfc57f
commit
77d2b0dd05
8 changed files with 108 additions and 107 deletions
|
@ -2,20 +2,20 @@
|
||||||
|
|
||||||
class apt::debian::testing {
|
class apt::debian::testing {
|
||||||
|
|
||||||
# deb http://debian.mirror.iweb.ca/debian/ testing main contrib non-free
|
# 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
|
# deb-src http://debian.mirror.iweb.ca/debian/ testing main contrib non-free
|
||||||
# Key: 55BE302B Server: subkeys.pgp.net
|
# Key: 55BE302B Server: subkeys.pgp.net
|
||||||
# debian-keyring
|
# debian-keyring
|
||||||
# debian-archive-keyring
|
# debian-archive-keyring
|
||||||
|
|
||||||
apt::source { "debian_testing":
|
apt::source { "debian_testing":
|
||||||
location => "http://debian.mirror.iweb.ca/debian/",
|
location => "http://debian.mirror.iweb.ca/debian/",
|
||||||
release => "testing",
|
release => "testing",
|
||||||
repos => "main contrib non-free",
|
repos => "main contrib non-free",
|
||||||
required_packages => "debian-keyring debian-archive-keyring",
|
required_packages => "debian-keyring debian-archive-keyring",
|
||||||
key => "55BE302B",
|
key => "55BE302B",
|
||||||
key_server => "subkeys.pgp.net",
|
key_server => "subkeys.pgp.net",
|
||||||
pin => "-10"
|
pin => "-10"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,20 +2,20 @@
|
||||||
|
|
||||||
class apt::debian::unstable {
|
class apt::debian::unstable {
|
||||||
|
|
||||||
# deb http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free
|
# 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
|
# deb-src http://debian.mirror.iweb.ca/debian/ unstable main contrib non-free
|
||||||
# Key: 55BE302B Server: subkeys.pgp.net
|
# Key: 55BE302B Server: subkeys.pgp.net
|
||||||
# debian-keyring
|
# debian-keyring
|
||||||
# debian-archive-keyring
|
# debian-archive-keyring
|
||||||
|
|
||||||
apt::source { "debian_unstable":
|
apt::source { "debian_unstable":
|
||||||
location => "http://debian.mirror.iweb.ca/debian/",
|
location => "http://debian.mirror.iweb.ca/debian/",
|
||||||
release => "unstable",
|
release => "unstable",
|
||||||
repos => "main contrib non-free",
|
repos => "main contrib non-free",
|
||||||
required_packages => "debian-keyring debian-archive-keyring",
|
required_packages => "debian-keyring debian-archive-keyring",
|
||||||
key => "55BE302B",
|
key => "55BE302B",
|
||||||
key_server => "subkeys.pgp.net",
|
key_server => "subkeys.pgp.net",
|
||||||
pin => "-10"
|
pin => "-10"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,15 @@
|
||||||
# force a package from a specific release
|
# force a package from a specific release
|
||||||
|
|
||||||
define apt::force(
|
define apt::force(
|
||||||
$release = 'testing',
|
$release = 'testing',
|
||||||
$version = false
|
$version = false
|
||||||
) {
|
) {
|
||||||
|
|
||||||
exec { "/usr/bin/aptitude -y -t ${release} install ${name}":
|
exec { "/usr/bin/aptitude -y -t ${release} install ${name}":
|
||||||
unless => $version ? {
|
unless => $version ? {
|
||||||
false => "/usr/bin/dpkg -l | grep ${name}",
|
false => "/usr/bin/dpkg -l | grep ${name}",
|
||||||
default => "/usr/bin/dpkg -l | grep ${name} | grep ${version}"
|
default => "/usr/bin/dpkg -l | grep ${name} | grep ${version}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,20 +28,20 @@ class apt(
|
||||||
|
|
||||||
package { "python-software-properties": }
|
package { "python-software-properties": }
|
||||||
|
|
||||||
file { "sources.list":
|
file { "sources.list":
|
||||||
ensure => present,
|
|
||||||
owner => root,
|
|
||||||
group => root,
|
|
||||||
mode => 644,
|
|
||||||
}
|
|
||||||
name => "${apt::params::root}/sources.list",
|
name => "${apt::params::root}/sources.list",
|
||||||
|
ensure => present,
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
mode => 644,
|
||||||
|
}
|
||||||
|
|
||||||
file { "sources.list.d":
|
file { "sources.list.d":
|
||||||
ensure => directory,
|
|
||||||
owner => root,
|
|
||||||
group => root,
|
|
||||||
}
|
|
||||||
name => "${apt::params::root}/sources.list.d",
|
name => "${apt::params::root}/sources.list.d",
|
||||||
|
ensure => directory,
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
}
|
||||||
|
|
||||||
exec { "apt_update":
|
exec { "apt_update":
|
||||||
command => "${apt::params::provider} update",
|
command => "${apt::params::provider} update",
|
||||||
|
|
|
@ -2,18 +2,18 @@
|
||||||
# pin a release in apt, useful for unstable repositories
|
# pin a release in apt, useful for unstable repositories
|
||||||
|
|
||||||
define apt::pin(
|
define apt::pin(
|
||||||
$packages = '*',
|
$packages = '*',
|
||||||
$priority = 0
|
$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
|
include apt::params
|
||||||
|
|
||||||
|
file { "${name}.pref":
|
||||||
name => "${apt::params::root}/preferences.d/${name}",
|
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}",
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,14 +4,14 @@ define apt::ppa() {
|
||||||
|
|
||||||
Class['apt'] -> Apt::Ppa[$title]
|
Class['apt'] -> Apt::Ppa[$title]
|
||||||
|
|
||||||
exec { "apt-update-${name}":
|
exec { "apt-update-${name}":
|
||||||
command => "/usr/bin/aptitude update",
|
command => "/usr/bin/aptitude update",
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
exec { "add-apt-repository-${name}":
|
exec { "add-apt-repository-${name}":
|
||||||
command => "/usr/bin/add-apt-repository ${name}",
|
command => "/usr/bin/add-apt-repository ${name}",
|
||||||
notify => Exec["apt-update-${name}"],
|
notify => Exec["apt-update-${name}"],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,12 @@ class apt::release (
|
||||||
$release_id
|
$release_id
|
||||||
) {
|
) {
|
||||||
|
|
||||||
owner => root,
|
|
||||||
group => root,
|
|
||||||
mode => 644,
|
|
||||||
}
|
|
||||||
include apt::params
|
include apt::params
|
||||||
|
|
||||||
file { "${apt::params::root}/apt.conf.d/01release":
|
file { "${apt::params::root}/apt.conf.d/01release":
|
||||||
|
owner => root,
|
||||||
|
group => root,
|
||||||
|
mode => 644,
|
||||||
content => "APT::Default-Release \"${release_id}\";"
|
content => "APT::Default-Release \"${release_id}\";"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,48 +2,49 @@
|
||||||
# add an apt source
|
# add an apt source
|
||||||
|
|
||||||
define apt::source(
|
define apt::source(
|
||||||
$location = '',
|
$location = '',
|
||||||
$release = 'karmic',
|
$release = 'karmic',
|
||||||
$repos = 'main',
|
$repos = 'main',
|
||||||
$include_src = true,
|
$include_src = true,
|
||||||
$required_packages = false,
|
$required_packages = false,
|
||||||
$key = false,
|
$key = false,
|
||||||
$key_server = 'keyserver.ubuntu.com',
|
$key_server = 'keyserver.ubuntu.com',
|
||||||
$pin = false
|
$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
|
include apt::params
|
||||||
|
|
||||||
|
|
||||||
|
file { "${name}.list":
|
||||||
name => "${apt::params::root}/sources.list.d/${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",
|
command => "${apt::params::provider} update",
|
||||||
|
subscribe => File["${name}.list"],
|
||||||
|
refreshonly => true,
|
||||||
|
}
|
||||||
|
|
||||||
|
if $required_packages != false {
|
||||||
exec { "${apt::params::provider} -y install ${required_packages}":
|
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"],
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue