summaryrefslogtreecommitdiff
path: root/manifests/monitor.pp
blob: 6a51cfff8b972c4330108a339695f9056e461faa (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
# Generate the hash using 'tor --hash-password <password>'
class onion::monitor(
  $control_password        = hiera('onion::monitor::control_password'),
  $hashed_control_password = hiera('onion::monitor::hashed_control_password')
) {
  tor::daemon::control{ "control":
    port                    => 9051,
    ensure                  => present,
    hashed_control_password => $hashed_control_password,
  }

  file { '/root/.arm':
    ensure => directory,
    owner  => root,
    group  => root,
    mode   => 0644,
  }

  file { '/root/.arm/armrc':
    ensure  => present,
    owner   => root,
    group   => root,
    mode    => 0640,
    content => template('onion/armrc.erb'),
    require => File['/root/.arm'],
  }
}