summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMicah <micah@riseup.net>2016-08-25 15:25:12 +0000
committerMicah <micah@riseup.net>2016-08-25 15:25:12 +0000
commitda48eefac71773beeca1797c6bbda884c50c85d8 (patch)
treee20311cd395d383fe145b93c6f388a466fd6d0de
parent9981a70f7ba1f9e4fe33e4eb46654295287c1fc1 (diff)
parent49b67cbc9112fddf49cc12264d2626fd952e0a7c (diff)
Merge branch 'master' into 'master'
Fix puppet lint issues See merge request !4
-rw-r--r--manifests/daemon/base.pp6
-rw-r--r--manifests/daemon/control.pp15
-rw-r--r--manifests/munin.pp2
-rw-r--r--manifests/repo.pp3
-rw-r--r--manifests/repo/debian.pp2
-rw-r--r--templates/torrc.directory.erb4
6 files changed, 18 insertions, 14 deletions
diff --git a/manifests/daemon/base.pp b/manifests/daemon/base.pp
index 63d7bc4..c0b1640 100644
--- a/manifests/daemon/base.pp
+++ b/manifests/daemon/base.pp
@@ -49,9 +49,9 @@ class tor::daemon::base inherits tor::base {
# tor configuration file
concat { $tor::daemon::config_file:
- mode => '0600',
- owner => 'debian-tor',
- group => 'debian-tor',
+ mode => '0600',
+ owner => 'debian-tor',
+ group => 'debian-tor',
}
# config file headers
diff --git a/manifests/daemon/control.pp b/manifests/daemon/control.pp
index 0172656..d19a1db 100644
--- a/manifests/daemon/control.pp
+++ b/manifests/daemon/control.pp
@@ -7,13 +7,16 @@ define tor::daemon::control(
$cookie_auth_file_group_readable = '',
$ensure = present ) {
- if $cookie_authentication == '0' and $hashed_control_password == '' and $ensure != 'absent' {
- fail('You need to define the tor control password')
- }
+ if $cookie_authentication == '0'
+ and $hashed_control_password == ''
+ and $ensure != 'absent' {
+ 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')
- }
+ 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') # lint:ignore:80chars
+ }
concat::fragment { '04.control':
ensure => $ensure,
diff --git a/manifests/munin.pp b/manifests/munin.pp
index 4412337..2a01175 100644
--- a/manifests/munin.pp
+++ b/manifests/munin.pp
@@ -8,7 +8,7 @@ class tor::munin {
}
Munin::Plugin::Deploy {
- config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie\n env.port 19051"
+ config => "user debian-tor\n env.cookiefile /var/run/tor/control.authcookie\n env.port 19051" # lint:ignore:80chars
}
munin::plugin::deploy {
'tor_connections':
diff --git a/manifests/repo.pp b/manifests/repo.pp
index f625599..9549219 100644
--- a/manifests/repo.pp
+++ b/manifests/repo.pp
@@ -1,3 +1,4 @@
+# setup repository for tor
class tor::repo (
$ensure = present,
$source_name = 'torproject.org',
@@ -10,7 +11,7 @@ class tor::repo (
class { 'tor::repo::debian': }
}
default: {
- fail("Unsupported managed repository for osfamily: ${::osfamily}, operatingsystem: ${::operatingsystem}, module ${module_name} currently only supports managing repos for osfamily Debian and Ubuntu")
+ fail("Unsupported managed repository for osfamily: ${::osfamily}, operatingsystem: ${::operatingsystem}, module ${module_name} currently only supports managing repos for osfamily Debian and Ubuntu") # lint:ignore:80chars
}
}
}
diff --git a/manifests/repo/debian.pp b/manifests/repo/debian.pp
index 174c331..81976a2 100644
--- a/manifests/repo/debian.pp
+++ b/manifests/repo/debian.pp
@@ -1,6 +1,6 @@
# PRIVATE CLASS: do not use directly
class tor::repo::debian inherits tor::repo {
- apt::source { $source_name:
+ apt::source { $tor::repo::source_name:
ensure => $::tor::repo::ensure,
location => $::tor::repo::location,
key => $::tor::repo::key,
diff --git a/templates/torrc.directory.erb b/templates/torrc.directory.erb
index 1af9f40..c7dc4ab 100644
--- a/templates/torrc.directory.erb
+++ b/templates/torrc.directory.erb
@@ -1,11 +1,11 @@
# directory listing
-<% if port != '0' -%>
+<% if @port != '0' -%>
DirPort <%= @port %>
<% end -%>
<% listen_addresses.each do |listen_address| -%>
DirListenAddress <%= listen_address %>
<% end -%>
<% if @port_front_page != '' -%>
-DirPortFrontPage <%= port_front_page %>
+DirPortFrontPage <%= @port_front_page %>
<%- end -%>