summaryrefslogtreecommitdiff
path: root/manifests/base.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/base.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/base.pp')
-rw-r--r--manifests/base.pp14
1 files changed, 14 insertions, 0 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
new file mode 100644
index 0000000..b98451b
--- /dev/null
+++ b/manifests/base.pp
@@ -0,0 +1,14 @@
+# basic management of resources for tor
+class tor::base {
+ package { [ 'tor', 'tor-geoipdb' ]:
+ ensure => $tor::ensure_version,
+ }
+
+ service { 'tor':
+ ensure => running,
+ enable => true,
+ hasrestart => true,
+ hasstatus => true,
+ require => Package['tor'],
+ }
+}