]> gitweb.fluxo.info Git - puppet-tor.git/commitdiff
Decouple torsocks into its own class.
authorintrigeri <intrigeri@boum.org>
Fri, 8 Jun 2012 15:27:59 +0000 (17:27 +0200)
committerintrigeri <intrigeri@boum.org>
Fri, 8 Jun 2012 15:27:59 +0000 (17:27 +0200)
immerda's big decoupling commit (8f1d1c4) is too hard to apply in one shot in
the current state of the shared branch, so let's pick bits of it one after
the other.

manifests/init.pp
manifests/torsocks.pp [new file with mode: 0644]

index 0c38073cdde0d3538c536160ec22921d5a71734a..d91618887ece2549a53c46db693af5697afabe59 100644 (file)
@@ -1,16 +1,11 @@
 class tor {
 
   if !$tor_ensure_version { $tor_ensure_version = 'installed' }
-  if !$torsocks_ensure_version { $torsocks_ensure_version = 'installed'}
   
   package { [ "tor", "tor-geoipdb" ]:
     ensure => $tor_ensure_version,
   }
 
-  package { "torsocks":
-    ensure => $torsocks_ensure_version,
-  }
-
   service { 'tor':
     ensure  => running,
     enable => true,
diff --git a/manifests/torsocks.pp b/manifests/torsocks.pp
new file mode 100644 (file)
index 0000000..6346707
--- /dev/null
@@ -0,0 +1,7 @@
+class tor::torsocks {
+  if !$torsocks_ensure_version { $torsocks_ensure_version = 'installed'}
+  include ::tor
+  package{'torsocks':
+    ensure => $torsocks_ensure_version,
+  }
+}