summaryrefslogtreecommitdiff
path: root/manifests/init.pp
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2013-01-02 13:54:57 +0100
committermh <mh@immerda.ch>2013-01-02 13:54:57 +0100
commit225adb9f30bff4064e3a166498f147bfd9a9f6eb (patch)
tree6836f4ddde3ea63be929048896ef6afd5568defc /manifests/init.pp
parent3fb09572cbbef20a72feb3e3a50711ba7eba1cea (diff)
refactor daemon and main class for better design
By extracting the resources to their own class we can avoid a bug in puppet that makes it hard to deal with inherited parametrized classes.
Diffstat (limited to 'manifests/init.pp')
-rw-r--r--manifests/init.pp13
1 files changed, 2 insertions, 11 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index c620718..3653c89 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -1,19 +1,10 @@
+# manage a basic tor installation
class tor (
$ensure_version = 'installed',
$use_munin = false
){
- package { [ 'tor', 'tor-geoipdb' ]:
- ensure => $ensure_version,
- }
-
- service { 'tor':
- ensure => running,
- enable => true,
- hasrestart => true,
- hasstatus => true,
- require => Package['tor'],
- }
+ include tor::base
if $use_munin {
include tor::munin