summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2012-08-04 16:49:53 +0200
committerintrigeri <intrigeri@boum.org>2012-08-04 16:49:53 +0200
commit817a37f02ec443603cbfe7e2cc5c55e07a2a471c (patch)
tree0a4fc1506a864ec498ed7024722c5d193c755558 /manifests
parentd017a7eee415a1398a0f7e533a5bfba3986e7505 (diff)
parent43f26a0ff6e7e882ed241a26c99f09d669524440 (diff)
Merge remote-tracking branch 'shared/master'
Conflicts: manifests/daemon.pp
Diffstat (limited to 'manifests')
-rw-r--r--manifests/daemon.pp35
-rw-r--r--manifests/munin.pp2
2 files changed, 28 insertions, 9 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp
index d04734d..e6d0c2e 100644
--- a/manifests/daemon.pp
+++ b/manifests/daemon.pp
@@ -102,10 +102,12 @@ class tor::daemon inherits tor {
# relay definition
define relay( $port = 0,
$listen_addresses = [],
- $outbound_bindaddresses = [],
- $bandwidth_rate = 0, # KB/s, 0 for no limit.
- $bandwidth_burst = 0, # KB/s, 0 for no limit.
- $accounting_max = 0, # GB, 0 for no limit.
+ $outbound_bindaddresses = $listen_addresses,
+ $bandwidth_rate = '', # KB/s, defaulting to using tor's default: 5120KB/s
+ $bandwidth_burst = '', # KB/s, defaulting to using tor's default: 10240KB/s
+ $relay_bandwidth_rate = 0, # KB/s, 0 for no limit.
+ $relay_bandwidth_burst = 0, # KB/s, 0 for no limit.
+ $accounting_max = 0, # GB, 0 for no limit.
$accounting_start = [],
$contact_info = '',
$my_family = '', # TODO: autofill with other relays
@@ -129,13 +131,20 @@ class tor::daemon inherits tor {
}
# control definition
- define control( $port = 0,
- $hashed_control_password = '',
+ define control( $port = 0,
+ $hashed_control_password = '',
+ $cookie_authentication = 0,
+ $cookie_auth_file = '',
+ $cookie_auth_file_group_readable = '',
$ensure = present ) {
- if $hashed_control_password == '' and $ensure != 'absent' {
+ if $cookie_authentication == '0' and $hashed_control_password == '' and $ensure != 'absent' {
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")
+ }
concatenated_file_part { '04.control':
dir => $tor::daemon::snippet_dir,
@@ -233,5 +242,15 @@ class tor::daemon inherits tor {
}
}
-}
+ # 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/manifests/munin.pp b/manifests/munin.pp
index ac2630a..8504f89 100644
--- a/manifests/munin.pp
+++ b/manifests/munin.pp
@@ -17,7 +17,7 @@ class tor::munin {
munin::plugin {
[ "tor_connections", "tor_routers", "tor_traffic" ]:
ensure => present,
- config => "user debian-tor\n env.cookiefile /var/lib/tor/control_auth_cookie",
+ config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie",
script_path_in => "/usr/local/share/munin-plugins";
}
}