Puppet Class: tor

Defined in:
manifests/init.pp

Summary

Main class, includes all other classes.

Overview

Parameters:

  • arm (Boolean) (defaults to: false)

    This parameter has been deprecated. Please use “tor::nyx” instead.

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

    This parameter has been deprecated. Please use “tor::nyx_version” instead.

  • 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.

  • nyx (Boolean) (defaults to: false)

    Install nyx, a terminal status monitor for Tor.

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

    The specific version of nyx that should be installed.

  • 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.



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# File 'manifests/init.pp', line 50

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 $nyx                      = false,
  String  $nyx_version              = 'installed',
  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'],
  }
}