summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/init.pp')
-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,
+ }
+ }
}