aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-01-02 14:14:28 +0100
committermh <mh@immerda.ch>2013-01-02 14:14:28 +0100
commite0cf3dc7de751df2b51e4a00cf397537da147e32 (patch)
treef087f27c2a16d72d053dad97e5c41cfec135176e
parente5a89865b70d694ebf978ed9743476b511974d92 (diff)
downloadpuppet-tor-e0cf3dc7de751df2b51e4a00cf397537da147e32.tar.gz
puppet-tor-e0cf3dc7de751df2b51e4a00cf397537da147e32.tar.bz2
manage a dedicated control port for munin
-rw-r--r--manifests/daemon.pp5
-rw-r--r--manifests/init.pp5
-rw-r--r--manifests/munin.pp9
3 files changed, 12 insertions, 7 deletions
diff --git a/manifests/daemon.pp b/manifests/daemon.pp
index 000c959..2440180 100644
--- a/manifests/daemon.pp
+++ b/manifests/daemon.pp
@@ -11,8 +11,11 @@ class tor::daemon (
class{'tor':
ensure_version => $ensure_version,
- use_munin => $use_munin,
}
include tor::daemon::base
+
+ if $use_munin {
+ include tor::munin
+ }
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 3653c89..c6e4e04 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,12 +1,7 @@
# manage a basic tor installation
class tor (
$ensure_version = 'installed',
- $use_munin = false
){
include tor::base
-
- if $use_munin {
- include tor::munin
- }
}
diff --git a/manifests/munin.pp b/manifests/munin.pp
index e1b369a..4412337 100644
--- a/manifests/munin.pp
+++ b/manifests/munin.pp
@@ -1,7 +1,14 @@
# munin plugins for puppet
class tor::munin {
+ tor::daemon::control{
+ 'control_port_for_munin':
+ port => 19051,
+ cookie_authentication => 1,
+ cookie_auth_file => '/var/run/tor/control.authcookie',
+ }
+
Munin::Plugin::Deploy {
- config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie"
+ config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie\n env.port 19051"
}
munin::plugin::deploy {
'tor_connections':