aboutsummaryrefslogtreecommitdiff
path: root/manifests/daemon/directory.pp
blob: b71b6e6f02e417ff0c6c6f94db2318c5af2ec26e (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
# directory advertising
define tor::daemon::directory (
  $port             = 0,
  $listen_addresses = [],
  $port_front_page  = '/etc/tor/tor.html',
  $ensure           = present ) {

  concat::fragment { '06.directory':
    ensure  => $ensure,
    content => template('tor/torrc.directory.erb'),
    owner   => 'debian-tor',
    group   => 'debian-tor',
    mode    => '0644',
    order   => 06,
    target  => $tor::daemon::config_file,
  }

  file { '/etc/tor/tor.html':
    ensure  => $ensure,
    source  => 'puppet:///modules/tor/tor.html',
    require => File['/etc/tor'],
    owner   => 'debian-tor',
    group   => 'debian-tor',
    mode    => '0644',
  }
}