$ensure = present ) {
if $cookie_authentication == '0' and $hashed_control_password == '' and $ensure != 'absent' {
- fail("You need to define the tor control password")
+ fail('You need to define the tor control password')
}
if $cookie_authentication == 0 and ($cookie_auth_file != '' or $cookie_auth_file_group_readable != '') {
- notice("You set a tor cookie authentication option, but do not have cookie_authentication on")
+ notice('You set a tor cookie authentication option, but do not have cookie_authentication on')
}
concatenated_file_part { '04.control':
}
file { '/etc/tor/tor.html':
- source => "puppet:///modules/tor/tor.html",
+ source => 'puppet:///modules/tor/tor.html',
require => File['/etc/tor'],
ensure => $ensure,
owner => 'debian-tor', group => 'debian-tor', mode => 0644,
$use_munin = false,
){
- package { [ "tor", "tor-geoipdb" ]:
+ package { [ 'tor', 'tor-geoipdb' ]:
ensure => $ensure_version,
}
class tor::munin {
file {
- "/usr/local/share/munin-plugins/tor_connections":
- source => "puppet:///modules/tor/munin/tor_connections",
+ '/usr/local/share/munin-plugins/tor_connections':
+ source => 'puppet:///modules/tor/munin/tor_connections',
mode => 0755, owner => root, group => root;
- "/usr/local/share/munin-plugins/tor_routers":
- source => "puppet:///modules/tor/munin/tor_routers",
+ '/usr/local/share/munin-plugins/tor_routers':
+ source => 'puppet:///modules/tor/munin/tor_routers',
mode => 0755, owner => root, group => root;
- "/usr/local/share/munin-plugins/tor_traffic":
- source => "puppet:///modules/tor/munin/tor_traffic",
+ '/usr/local/share/munin-plugins/tor_traffic':
+ source => 'puppet:///modules/tor/munin/tor_traffic',
mode => 0755, owner => root, group => root;
}
munin::plugin {
- [ "tor_connections", "tor_routers", "tor_traffic" ]:
+ [ 'tor_connections', 'tor_routers', 'tor_traffic' ]:
ensure => present,
config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie",
- script_path_in => "/usr/local/share/munin-plugins";
+ script_path_in => '/usr/local/share/munin-plugins';
}
}
ensure => present,
}
- file { "/etc/polipo/config":
+ file { '/etc/polipo/config':
ensure => present,
owner => root,
group => root,
mode => 0644,
- source => "puppet:///modules/tor/polipo/polipo.conf",
- require => Package["polipo"],
- notify => Service["polipo"],
+ source => 'puppet:///modules/tor/polipo/polipo.conf',
+ require => Package['polipo'],
+ notify => Service['polipo'],
}
- service { "polipo":
+ service { 'polipo':
ensure => running,
enable => true,
- require => [ Package["polipo"], Service["tor"] ],
+ require => [ Package['polipo'], Service['tor'] ],
}
}
class tor::polipo::debian inherits tor::polipo::base {
# TODO: restore file to original state after the following bug is solved:
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580434
- file { "/etc/cron.daily/polipo":
+ file { '/etc/cron.daily/polipo':
ensure => present,
owner => root,
group => root,
mode => 0755,
- require => Package["polipo"],
- source => "puppet:///modules/tor/polipo/polipo.cron",
+ require => Package['polipo'],
+ source => 'puppet:///modules/tor/polipo/polipo.cron',
}
}