]> gitweb.fluxo.info Git - puppet-tor.git/commitdiff
Use single-quotes for strings that do not contain variables.
authorintrigeri <intrigeri@boum.org>
Sun, 11 Nov 2012 20:43:03 +0000 (21:43 +0100)
committerintrigeri <intrigeri@boum.org>
Sun, 11 Nov 2012 20:43:03 +0000 (21:43 +0100)
Puppet style guide, section "8. Quoting", reads: "All strings that do not
contain variables should be enclosed in single quotes."

manifests/daemon.pp
manifests/init.pp
manifests/munin.pp
manifests/polipo/base.pp
manifests/polipo/debian.pp

index 28d257df5999ca16970851b8669dc52a7980a0b6..683d2c6cd207fcdcf175d65ad00199b192d29200 100644 (file)
@@ -136,11 +136,11 @@ class tor::daemon (
                   $ensure                  = present ) {
 
     if $cookie_authentication == '0' and $hashed_control_password == '' and $ensure != 'absent' {
-      fail("You need to define the tor control password")
+      fail('You need to define the tor control password')
     }
 
     if $cookie_authentication == 0 and ($cookie_auth_file != '' or $cookie_auth_file_group_readable != '') {
-      notice("You set a tor cookie authentication option, but do not have cookie_authentication on")
+      notice('You set a tor cookie authentication option, but do not have cookie_authentication on')
     }
     
     concatenated_file_part { '04.control':
@@ -178,7 +178,7 @@ class tor::daemon (
     }
     
     file { '/etc/tor/tor.html':
-      source  => "puppet:///modules/tor/tor.html",
+      source  => 'puppet:///modules/tor/tor.html',
       require => File['/etc/tor'],
       ensure  => $ensure,
       owner => 'debian-tor', group => 'debian-tor', mode => 0644, 
index 613eb292c1de234d44ccc6160607b3bd4d7b831d..b8e1917e2d8ccaaba80728dbcf0b75903093cd92 100644 (file)
@@ -3,7 +3,7 @@ class tor (
   $use_munin      = false,
 ){
 
-  package { [ "tor", "tor-geoipdb" ]:
+  package { [ 'tor', 'tor-geoipdb' ]:
     ensure => $ensure_version,
   }
 
index 8504f8901fe0b6bef71ad9adbc4bff8b9a125a3e..24ea53ee9091574fcafcab4b361aece19fb23ba3 100644 (file)
@@ -1,23 +1,23 @@
 class tor::munin {
 
   file {
-    "/usr/local/share/munin-plugins/tor_connections":
-      source => "puppet:///modules/tor/munin/tor_connections",
+    '/usr/local/share/munin-plugins/tor_connections':
+      source => 'puppet:///modules/tor/munin/tor_connections',
       mode => 0755, owner => root, group => root;
     
-    "/usr/local/share/munin-plugins/tor_routers":
-      source => "puppet:///modules/tor/munin/tor_routers",
+    '/usr/local/share/munin-plugins/tor_routers':
+      source => 'puppet:///modules/tor/munin/tor_routers',
       mode => 0755, owner => root, group => root;
 
-    "/usr/local/share/munin-plugins/tor_traffic":
-      source => "puppet:///modules/tor/munin/tor_traffic",
+    '/usr/local/share/munin-plugins/tor_traffic':
+      source => 'puppet:///modules/tor/munin/tor_traffic',
       mode => 0755, owner => root, group => root;
   }
 
   munin::plugin {
-    [ "tor_connections", "tor_routers", "tor_traffic" ]:
+    [ 'tor_connections', 'tor_routers', 'tor_traffic' ]:
       ensure => present,
       config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie",
-      script_path_in => "/usr/local/share/munin-plugins";
+      script_path_in => '/usr/local/share/munin-plugins';
   }
 }
index fca4b21845cc5128b588baf8ab080e1e600a293e..8c1dd1cfb4bca0c57edcf7b64df37c17732ed79f 100644 (file)
@@ -3,19 +3,19 @@ class tor::polipo::base {
     ensure => present,
   }
 
-  file { "/etc/polipo/config":
+  file { '/etc/polipo/config':
     ensure  => present,
     owner   => root,
     group   => root,
     mode    => 0644,
-    source  => "puppet:///modules/tor/polipo/polipo.conf",
-    require => Package["polipo"],
-    notify  => Service["polipo"],
+    source  => 'puppet:///modules/tor/polipo/polipo.conf',
+    require => Package['polipo'],
+    notify  => Service['polipo'],
   }
 
-  service { "polipo":
+  service { 'polipo':
     ensure  => running,
     enable  => true,
-    require => [ Package["polipo"], Service["tor"] ],
+    require => [ Package['polipo'], Service['tor'] ],
   }
 }
index 198611925ad8ca62face05ff616c6e832219bdf2..0a8aa9300affa19201378e0a1735265f190ad2f9 100644 (file)
@@ -1,12 +1,12 @@
 class tor::polipo::debian inherits tor::polipo::base {
   # TODO: restore file to original state after the following bug is solved:
   # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580434
-  file { "/etc/cron.daily/polipo":
+  file { '/etc/cron.daily/polipo':
     ensure  => present,
     owner   => root,
     group   => root,
     mode    => 0755,
-    require => Package["polipo"],
-    source  => "puppet:///modules/tor/polipo/polipo.cron",
+    require => Package['polipo'],
+    source  => 'puppet:///modules/tor/polipo/polipo.cron',
   }
 }