format standardization

This commit is contained in:
Micah Anderson 2010-12-07 13:18:41 -05:00
parent bb03c32b45
commit e15283b781
11 changed files with 35 additions and 31 deletions

View file

@ -1,11 +1,13 @@
define apt::apt_conf(
$ensure = 'present',
$source = '',
$content = undef
){
$content = undef )
{
if $source == '' and $content == undef {
fail("One of \$source or \$content must be specified for apt_conf ${name}")
}
if $source != '' and $content != undef {
fail("Only one of \$source or \$content must specified for apt_conf ${name}")
}

View file

@ -1,3 +1,4 @@
class apt::cron::base {
package { cron-apt: ensure => installed }
package { cron-apt: ensure => installed }
}

View file

@ -1,4 +1,5 @@
class apt::dselect {
# suppress annoying help texts of dselect
append_if_no_such_line { dselect_expert:
file => "/etc/dpkg/dselect.cfg",

View file

@ -88,23 +88,23 @@ class apt {
}
apt_conf { "02show_upgraded":
source => ["puppet:///modules/site-apt/${fqdn}/02show_upgraded",
"puppet:///modules/site-apt/02show_upgraded",
"puppet:///modules/apt/02show_upgraded"]
source => [ "puppet:///modules/site-apt/${fqdn}/02show_upgraded",
"puppet:///modules/site-apt/02show_upgraded",
"puppet:///modules/apt/02show_upgraded" ]
}
if ( $virtual == "vserver" ) {
apt_conf { "03clean_vserver":
source => ["puppet:///modules/site-apt/${fqdn}/03clean_vserver",
"puppet:///modules/site-apt/03clean_vserver",
"puppet:///modules/apt/03clean_vserver"]
source => [ "puppet:///modules/site-apt/${fqdn}/03clean_vserver",
"puppet:///modules/site-apt/03clean_vserver",
"puppet:///modules/apt/03clean_vserver" ]
}
}
else {
apt_conf { "03clean":
source => ["puppet:///modules/site-apt/${fqdn}/03clean",
"puppet:///modules/site-apt/03clean",
"puppet:///modules/apt/03clean"]
source => [ "puppet:///modules/site-apt/${fqdn}/03clean",
"puppet:///modules/site-apt/03clean",
"puppet:///modules/apt/03clean" ]
}
}
@ -121,13 +121,9 @@ class apt {
# backward compatibility: upgrade from previous versions of this module.
file {
["/etc/apt/apt.conf.d/from_puppet",
"/etc/apt/apt.conf.d/99from_puppet"
]:
[ "/etc/apt/apt.conf.d/from_puppet", "/etc/apt/apt.conf.d/99from_puppet" ]:
ensure => 'absent',
require => [ Apt_conf['02show_upgraded'],
Apt_conf['03clean'],
],
require => [ Apt_conf['02show_upgraded'], Apt_conf['03clean'] ];
}
# watch .d directories and ensure they are present
@ -143,13 +139,12 @@ class apt {
'refresh_apt':
command => '/usr/bin/apt-get update && sleep 1',
refreshonly => true,
subscribe => [ File['/etc/apt/apt.conf.d'],
Config_file['/etc/apt/sources.list'] ];
subscribe => [ File['/etc/apt/apt.conf.d'], Config_file['/etc/apt/sources.list'] ];
'update_apt':
command => '/usr/bin/apt-get update && /usr/bin/apt-get autoclean',
refreshonly => true,
require => [ File['/etc/apt/apt.conf.d',
'/etc/apt/preferences'],
require => [ File['/etc/apt/apt.conf.d', '/etc/apt/preferences' ],
Config_file['/etc/apt/sources.list'] ],
loglevel => info,
# Another Semaphor for all packages to reference

View file

@ -3,7 +3,7 @@ class apt::preferences {
include common::moduledir
$apt_preferences_dir = "${common::moduledir::module_dir_path}/apt/preferences"
module_dir{'apt/preferences': }
file{"${apt_preferences_dir}_header":
file { "${apt_preferences_dir}_header":
content => $custom_preferences ? {
'' => $operatingsystem ? {
'debian' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
@ -13,7 +13,7 @@ class apt::preferences {
},
}
concatenated_file{'/etc/apt/preferences':
concatenated_file { '/etc/apt/preferences':
dir => $apt_preferences_dir,
header => "${apt_preferences_dir}_header",
# use Concatenated_file[apt_config] to reference a completed configuration

View file

@ -1,5 +1,6 @@
class apt::preferences::absent {
file {'/etc/apt/preferences':
file { '/etc/apt/preferences':
ensure => absent,
}
}

View file

@ -2,8 +2,9 @@ define apt::preferences_snippet(
$ensure = 'present',
$source = '',
$release,
$priority
){
$priority )
{
if $custom_preferences == false {
fail("Trying to define a preferences_snippet with \$custom_preferences set to false.")
}

View file

@ -5,7 +5,7 @@ define apt::preseeded_package ($content = "", $ensure = "installed") {
default => $content
}
file{ $seedfile:
file { $seedfile:
content => $real_content,
mode => 0600, owner => root, group => root,
}

View file

@ -1,8 +1,9 @@
define apt::sources_list (
$ensure = 'present',
$source = '',
$content = undef
) {
$content = undef )
{
if $source == '' and $content == undef {
fail("One of \$source or \$content must be specified for apt_sources_snippet ${name}")
}

View file

@ -1,5 +1,6 @@
class apt::unattended_upgrades {
package{'unattended-upgrades':
package { 'unattended-upgrades':
ensure => present,
require => undef,
}

View file

@ -1,4 +1,5 @@
define apt::upgrade_package ($version = "") {
case $version {
'': {
exec { "aptitude -y install $name":