]> gitweb.fluxo.info Git - puppet-tor.git/commitdiff
Adding support for MapAddress tor option
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 21 Jun 2012 02:24:30 +0000 (23:24 -0300)
committerintrigeri <intrigeri@boum.org>
Sat, 7 Jul 2012 17:02:14 +0000 (19:02 +0200)
manifests/daemon.pp
templates/torrc.map_address.erb [new file with mode: 0644]

index 6d8c315b2993d2f61dfd3f803d166a6d1ef30876..d1d57df448cb11d3ca180015f82036d3ef06c342 100644 (file)
@@ -184,5 +184,17 @@ class tor::daemon inherits tor {
       ensure  => $ensure,
     }
   } 
+
+  # map address definition
+  define map_address( $address = '',
+                      $newaddress = '') {
+
+    concatenated_file_part { "08.map_address.${name}":
+      dir     => $tor::daemon::snippet_dir,
+      content => template('tor/torrc.map_address.erb'),
+      owner   => 'debian-tor', group => 'debian-tor', mode => 0644, 
+      ensure  => $ensure,
+    }
+  } 
 }
 
diff --git a/templates/torrc.map_address.erb b/templates/torrc.map_address.erb
new file mode 100644 (file)
index 0000000..3fb0274
--- /dev/null
@@ -0,0 +1,3 @@
+# map address <%= name %>
+MapAddress <%= address %> <%= newaddress %>
+