diff options
author | drebs <drebs@riseup.net> | 2012-01-08 01:02:13 -0200 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2012-01-08 01:02:13 -0200 |
commit | 00349b7ba959f5ad133a9a0ec1e440a10fa93353 (patch) | |
tree | 00a12dc019538d6bf6cde392517b384ca386ae34 | |
parent | 9e6181174be9c98732517c897a04dc922d558e3c (diff) | |
download | puppet-tor-00349b7ba959f5ad133a9a0ec1e440a10fa93353.tar.gz puppet-tor-00349b7ba959f5ad133a9a0ec1e440a10fa93353.tar.bz2 |
completing default relay config
-rw-r--r-- | manifests/daemon.pp | 2 | ||||
-rw-r--r-- | manifests/init.pp | 26 | ||||
-rw-r--r-- | manifests/polipo.pp | 4 | ||||
-rw-r--r-- | manifests/relay.pp | 2 |
4 files changed, 31 insertions, 3 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp index d05f94f..037171b 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -7,7 +7,7 @@ class tor::daemon inherits tor { require => [ Package['tor'], Service["polipo"] ], } - define config( $socks_port = 9001, + 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' ], diff --git a/manifests/init.pp b/manifests/init.pp index bf4f696..c585489 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -8,7 +8,31 @@ class tor { ensure => absent, } - package { [ "tor", "polipo", "torsocks" ]: + package { [ "tor", "torsocks" ]: ensure => installed, } + + group { "debian-tor": + ensure => present, + allowdupe => false, + require => Package["tor"], + } + + user { "debian-tor": + allowdupe => false, + comment => "tor user,,,", + ensure => present, + home => "/var/tor", + shell => "/bin/sh", + gid => "debian-tor", + require => Group["debian-tor"], + } + + file { "/var/tor": + ensure => directory, + mode => 0755, + owner => debian-tor, + group => debian-tor, + require => User["debian-tor"], + } } diff --git a/manifests/polipo.pp b/manifests/polipo.pp index 7509563..d7b1caa 100644 --- a/manifests/polipo.pp +++ b/manifests/polipo.pp @@ -1,5 +1,9 @@ class polipo { + package { "polipo": + ensure => installed, + } + service { "polipo": ensure => running, require => Package["polipo"], diff --git a/manifests/relay.pp b/manifests/relay.pp index fb2bf18..b57bc8d 100644 --- a/manifests/relay.pp +++ b/manifests/relay.pp @@ -1,6 +1,6 @@ class tor::relay inherits tor::daemon { - tor::daemon::config { "tor-relay-$name": + tor::daemon::config { "tor-relay": socks_port => 0, socks_listen_addresses => [], or_port => 9001, |