aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: 726b247bf9252c2248737ab22e60eaf769ab2428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class tor {
  package { "privoxy":
    ensure => absent,
  }

  package { [ "tor", "polipo", "torsocks" ]:
    ensure => installed,
  }

  service { "tor":
    ensure  => running,
    require => [ Package['tor'], Service["polipo"] ],
  }

  service { "polipo":
    ensure  => running,
    require => Package["polipo"],
  }

  file { "/etc/polipo":
    ensure => directory,
    owner  => root,
    group  => root,
    mode   => 0755,
  }

  file { "/etc/polipo/config":
    ensure  => present,
    owner   => root,
    group   => root,
    mode    => 0644,
    source  => "puppet://$server/modules/tor/polipo.conf",
    notify  => Service["polipo"],
    require => File["/etc/polipo"],
  }

  # 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,
    source  => "puppet://$server/modules/tor/polipo.cron",
  }
}