diff options
author | mh <mh@immerda.ch> | 2011-10-28 16:50:30 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2011-10-28 16:51:58 +0200 |
commit | 8f1d1c4ef7a1298d448416997218dafb5d40166f (patch) | |
tree | 069afbe224ffeebd7d0633df9a52a0e3c039d6b3 /manifests/polipo | |
parent | 5d2516c3a7a6b34399ff7b856fc9900ef1e41294 (diff) | |
download | puppet-tor-8f1d1c4ef7a1298d448416997218dafb5d40166f.tar.gz puppet-tor-8f1d1c4ef7a1298d448416997218dafb5d40166f.tar.bz2 |
decouple polipo and torsocks into their own subclasses, so we can for example also just install tor
Diffstat (limited to 'manifests/polipo')
-rw-r--r-- | manifests/polipo/base.pp | 21 | ||||
-rw-r--r-- | manifests/polipo/debian.pp | 12 |
2 files changed, 33 insertions, 0 deletions
diff --git a/manifests/polipo/base.pp b/manifests/polipo/base.pp new file mode 100644 index 0000000..a634920 --- /dev/null +++ b/manifests/polipo/base.pp @@ -0,0 +1,21 @@ +class tor::polipo::base { + package{'polipo': + ensure => present, + } + + file { "/etc/polipo/config": + ensure => present, + owner => root, + group => root, + mode => 0644, + source => "puppet:///modules/tor/polipo/polipo.conf", + require => Package["polipo"], + notify => Service["polipo"], + before => Service["tor"], + } + + service { "polipo": + ensure => running, + enable => true, + } +} diff --git a/manifests/polipo/debian.pp b/manifests/polipo/debian.pp new file mode 100644 index 0000000..1986119 --- /dev/null +++ b/manifests/polipo/debian.pp @@ -0,0 +1,12 @@ +class tor::polipo::debian inherits tor::polipo::base { + # TODO: restore file to original state after the following bug is solved: + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580434 + file { "/etc/cron.daily/polipo": + ensure => present, + owner => root, + group => root, + mode => 0755, + require => Package["polipo"], + source => "puppet:///modules/tor/polipo/polipo.cron", + } +} |