aboutsummaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authordrebs <drebs@riseup.net>2012-01-07 12:25:24 -0200
committerdrebs <drebs@riseup.net>2012-01-07 12:25:24 -0200
commit8868ef53819a0e2500a1a452e4bf55182ccea3cc (patch)
tree8483ec77e528c629db77bf5613151614a9060108 /manifests
parent606e8241b80d14c8d0be414ae1690618edb7e060 (diff)
downloadpuppet-tor-8868ef53819a0e2500a1a452e4bf55182ccea3cc.tar.gz
puppet-tor-8868ef53819a0e2500a1a452e4bf55182ccea3cc.tar.bz2
torrc is generated by a definition
Diffstat (limited to 'manifests')
-rw-r--r--manifests/init.pp32
1 files changed, 32 insertions, 0 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index 726b247..1d4b5f5 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -43,4 +43,36 @@ class tor {
mode => 0755,
source => "puppet://$server/modules/tor/polipo.cron",
}
+
+ define config( $socks_port = 9050,
+ $socks_listen_addresses = [ '127.0.0.1' ],
+ $socks_policies = [ 'accept 127.0.0.1/16', 'reject *' ],
+ $log_rules = [ 'notice file /var/log/tor/notices.log' ],
+ $data_directory = '/var/tor',
+ $control_port = false,
+ $hashed_control_password = '',
+ $hidden_services = [],
+ $or_port = 443,
+ $or_listen_address = '0.0.0.0:9090',
+ $nickname = '',
+ $address = $hostname,
+ $relay_bandwith_rate = 0, # KB/s, 0 for no limit.
+ $relay_bandwith_burst = 0, # KB/s, 0 for no limit.
+ $accounting_max = 0, # GB, 0 for no limit.
+ $accounting_start = [],
+ $contact_info = '',
+ $dir_port = 0,
+ $dir_listen_address = '',
+ $dir_front_page = '',
+ $my_family = '',
+ $exit_policies = [],
+ ) {
+ file { "/etc/tor/torrc":
+ ensure => present,
+ content => template('tor/torrc.erb'),
+ owner => root,
+ group => root,
+ mode => 0644,
+ }
+ }
}