aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: 0c38073cdde0d3538c536160ec22921d5a71734a (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
class tor {

  if !$tor_ensure_version { $tor_ensure_version = 'installed' }
  if !$torsocks_ensure_version { $torsocks_ensure_version = 'installed'}
  
  package { [ "tor", "tor-geoipdb" ]:
    ensure => $tor_ensure_version,
  }

  package { "torsocks":
    ensure => $torsocks_ensure_version,
  }

  service { 'tor':
    ensure  => running,
    enable => true,
    hasrestart => true,
    hasstatus => true,
    require => Package['tor'],
  }

  if $use_munin {
    include tor::munin
  }
}