Puppet Class: tor

Defined in:
manifests/init.pp

Summary

Main class, includes all other classes.

Overview

Parameters:

  • arm (Boolean) (defaults to: false)

    Install tor-arm.

  • arm_version (String) (defaults to: 'installed')

    The specific version of tor-arm that should be installed.

  • automap_hosts_on_resolve (Boolean) (defaults to: false)

    Enables AutomapOnResolve.

  • data_dir (Stdlib::Unixpath) (defaults to: '/var/lib/tor')

    Tor’s main data directory.

  • config_file (String) (defaults to: '/etc/tor/torrc')

    Tor’s main config file (torrc).

  • log_rules (Array) (defaults to: [ 'notice file /var/log/tor/notices.log' ])

    Tor logging rules.

  • safe_logging (Boolean) (defaults to: true)

    Scrub potentially sensitive strings from log messages.

  • torsocks (Boolean) (defaults to: false)

    Install torsocks.

  • torsocks_version (String) (defaults to: 'installed')

    The specific version of torsocks that should be installed.

  • version (String) (defaults to: 'installed')

    The specific version of Tor that should be installed.

  • use_bridges (Boolean) (defaults to: false)

    Use Bridges as your entry node.

  • use_upstream_repository (Boolean) (defaults to: false)

    Install Tor and related packages from the upstream repository instead of using your distribution’s.

  • upstream_release (String) (defaults to: 'stable')

    What release from the upstream repository should be used to install Tor and related packages.



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'manifests/init.pp', line 44

class tor (
  Boolean $arm                      = false,
  String  $arm_version              = 'installed',
  Boolean $automap_hosts_on_resolve = false,
  Stdlib::Unixpath $data_dir        = '/var/lib/tor',
  String  $config_file              = '/etc/tor/torrc',
  Array   $log_rules                = [ 'notice file /var/log/tor/notices.log' ],
  Boolean $safe_logging             = true,
  Boolean $torsocks                 = false,
  String  $torsocks_version         = 'installed',
  String  $version                  = 'installed',
  Boolean $use_bridges              = false,
  Boolean $use_upstream_repository  = false,
  String  $upstream_release         = 'stable',
) {

  include ::tor::install
  include ::tor::daemon::base

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