Browse Source

Fix style errors

Erik Dalén 11 years ago
parent
commit
a3d782c3b5
7 changed files with 24 additions and 19 deletions
  1. 12 9
      manifests/backports.pp
  2. 2 2
      manifests/conf.pp
  3. 1 1
      manifests/init.pp
  4. 1 1
      manifests/key.pp
  5. 1 1
      manifests/pin.pp
  6. 4 2
      manifests/ppa.pp
  7. 3 3
      tests/key.pp

+ 12 - 9
manifests/backports.pp

@@ -16,7 +16,8 @@
 #
 # == Authors
 #
-# Ben Hughes, I think. At least blame him if this goes wrong. I just added puppet doc.
+# Ben Hughes, I think. At least blame him if this goes wrong.
+# I just added puppet doc.
 #
 # == Copyright
 #
@@ -27,18 +28,20 @@ class apt::backports(
 ) inherits apt::params {
 
   $release_real = downcase($release)
+  $key = $::lsbdistid ? {
+    'debian' => '55BE302B',
+    'ubuntu' => '437D05B5',
+  }
+  $repos = $::lsbdistid ? {
+    'debian' => 'main contrib non-free',
+    'ubuntu' => 'main universe multiverse restricted',
+  }
 
   apt::source { 'backports':
     location   => $location,
     release    => "${release_real}-backports",
-    repos      => $::lsbdistid ? {
-      'debian' => 'main contrib non-free',
-      'ubuntu' => 'main universe multiverse restricted',
-    },
-    key        => $::lsbdistid ? {
-      'debian' => '55BE302B',
-      'ubuntu' => '437D05B5',
-    },
+    repos      => $repos,
+    key        => $key,
     key_server => 'pgp.mit.edu',
     pin        => '200',
   }

+ 2 - 2
manifests/conf.pp

@@ -1,7 +1,7 @@
 define apt::conf (
+  $content,
   $ensure   = present,
-  $priority = '50',
-  $content
+  $priority = '50'
 ) {
 
   include apt::params

+ 1 - 1
manifests/init.pp

@@ -108,7 +108,7 @@ class apt(
   }
 
   # Need anchor to provide containment for dependencies.
-  anchor { "apt::update":
+  anchor { 'apt::update':
     require => Class['apt::update'],
   }
 }

+ 1 - 1
manifests/key.pp

@@ -54,7 +54,7 @@ define apt::key (
         }
       }
 
-      Anchor["apt::key $upkey present"] -> Anchor["apt::key/$title"]
+      Anchor["apt::key ${upkey} present"] -> Anchor["apt::key/${title}"]
 
     }
     absent: {

+ 1 - 1
manifests/pin.pp

@@ -30,6 +30,6 @@ define apt::pin(
     owner   => root,
     group   => root,
     mode    => '0644',
-    content => template("apt/pin.pref.erb"),
+    content => template('apt/pin.pref.erb'),
   }
 }

+ 4 - 2
manifests/ppa.pp

@@ -25,8 +25,10 @@ define apt::ppa(
     command   => "/usr/bin/add-apt-repository ${name}",
     creates   => "${sources_list_d}/${sources_list_d_filename}",
     logoutput => 'on_failure',
-    require   => [ File[$sources_list_d],
-                   Package['python-software-properties'] ],
+    require   => [
+      File[$sources_list_d],
+      Package['python-software-properties'],
+    ],
     notify    => Exec['apt_update'],
   }
 

+ 3 - 3
tests/key.pp

@@ -1,5 +1,5 @@
 # Declare Apt key for apt.puppetlabs.com source
-apt::key { "puppetlabs":
-  key        => "4BD6EC30",
-  key_server => "pgp.mit.edu",
+apt::key { 'puppetlabs':
+  key        => '4BD6EC30',
+  key_server => 'pgp.mit.edu',
 }