Skip to content

Commit

Permalink
puppet-lint: Enable whitespace checker
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jun 23, 2020
1 parent 3daaf69 commit 0decb35
Show file tree
Hide file tree
Showing 156 changed files with 64 additions and 227 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ end

group :test do
gem 'voxpupuli-test', '>= 1.0.0', :require => false
gem 'puppet-lint-manifest_whitespace-check', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
end
Expand Down
4 changes: 1 addition & 3 deletions examples/plugins/ceph.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include collectd

class { 'collectd::plugin::ceph':
osds => [ 'osd.0', 'osd.1', 'osd.2'],
osds => ['osd.0', 'osd.1', 'osd.2'],
}


4 changes: 2 additions & 2 deletions examples/plugins/filecount.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
},
}

collectd::plugin::filecount::directory {'foodir':
collectd::plugin::filecount::directory { 'foodir':
path => '/path/to/dir',
}

collectd::plugin::filecount::directory {'aborted-uploads':
collectd::plugin::filecount::directory { 'aborted-uploads':
path => '/var/spool/foo/upload',
pattern => '.part.*',
mtime => '5m',
Expand Down
8 changes: 4 additions & 4 deletions examples/plugins/perl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
order => 99,
config => {
'foo' => 'bar',
'key' => [ 'val1', 'val2' ],
'key' => ['val1', 'val2'],
},
}

collectd::plugin::perl::plugin { 'bar':
module => 'B',
enable_debugger => 'DProf',
include_dir => ['/tmp', '/tmp/lib' ],
include_dir => ['/tmp', '/tmp/lib'],
}

#collectd::plugin::perl {
Expand All @@ -44,10 +44,10 @@
'foo' => 'bar',
'more' => {
'complex' => 'structure',
'no' => [ 'a', 'b' ],
'no' => ['a', 'b'],
'yes' => {
'last' => 'level',
'and' => [ 'array' , 'thing' ],
'and' => ['array' , 'thing'],
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion examples/plugins/processes.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include collectd

class { 'collectd::plugin::processes':
processes => [ 'process1', 'process2' ],
processes => ['process1', 'process2'],
process_matches => [
{ name => 'process-all',
regex => 'process[0-9]' },
Expand Down
5 changes: 2 additions & 3 deletions examples/plugins/snmp.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include collectd

class {'collectd::plugin::snmp':
data => {
class { 'collectd::plugin::snmp':
data => {
amavis_incoming_messages => {
'type' => 'counter',
'table' => false,
Expand All @@ -19,4 +19,3 @@
},
},
}

2 changes: 0 additions & 2 deletions examples/purge_config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
purge_config => true,
}


collectd::plugin { 'battery': }
collectd::plugin { 'cpu': }
collectd::plugin { 'df': }
Expand All @@ -18,4 +17,3 @@
collectd::plugin { 'processes': }
collectd::plugin { 'swap': }
collectd::plugin { 'users': }

4 changes: 1 addition & 3 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# private
class collectd::config inherits collectd {

class collectd::configinherits collectd {
assert_private()

$_conf_content = $collectd::purge_config ? {
Expand Down Expand Up @@ -42,5 +41,4 @@
}

File['collectd.d'] -> Concat <| tag == 'collectd' |>

}
1 change: 0 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
Integer[1] $write_threads = $collectd::params::write_threads,
Boolean $utils = $collectd::params::utils,
) inherits collectd::params {

$collectd_version_real = pick_default($facts['collectd_version'], $minimum_version)

contain collectd::repo
Expand Down
4 changes: 1 addition & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# @summary installs collectd
# @api private
class collectd::install {

assert_private()

if $collectd::manage_package {
Expand All @@ -14,9 +13,8 @@

if $collectd::utils and ( $facts['os']['family'] == 'Debian' or
( $facts['os']['family'] == 'RedHat' and versioncmp($facts['os']['release']['major'],'8') >= 0 )) {
package{'collectd-utils':
package { 'collectd-utils':
ensure => $collectd::package_ensure,
}
}

}
7 changes: 3 additions & 4 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#
class collectd::params {

$autoloadplugin = false
$fqdnlookup = true
$collectd_hostname = $facts['networking']['hostname']
Expand All @@ -16,7 +15,7 @@
$read_threads = 5
$write_threads = 5
$timeout = 2
$typesdb = [ '/usr/share/collectd/types.db' ]
$typesdb = ['/usr/share/collectd/types.db']
$write_queue_limit_high = undef
$write_queue_limit_low = undef
$package_ensure = 'present'
Expand All @@ -33,12 +32,12 @@

case $facts['kernel'] {
'OpenBSD': { $has_wordexp = false }
default: { $has_wordexp = true }
default: { $has_wordexp = true }
}

case $facts['os']['family'] {
'Debian': {
$package_name = [ 'collectd', 'collectd-core' ]
$package_name = ['collectd', 'collectd-core']
$package_provider = 'apt'
$collectd_dir = '/etc/collectd'
$plugin_conf_dir = "${collectd_dir}/conf.d"
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
$plugin = $name,
Optional[Integer] $flushinterval = undef,
) {

include collectd

$conf_dir = $collectd::plugin_conf_dir
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/aggregation.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
Optional[Integer[1]] $interval = undef,
Hash $aggregators = {},
) {

include collectd

collectd::plugin { 'aggregation':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/aggregation/aggregator.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Optional[Boolean] $calculatemaximum = undef,
Optional[Boolean] $calculatestddev = undef,
) {

include collectd
include collectd::plugin::aggregation

Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/amqp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
Boolean $graphiteseparateinstances = false,
Boolean $graphitealwaysappendds = false,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/amqp1.pp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
Optional[Integer] $retry_delay = undef,
Optional[Integer] $interval = undef,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
class collectd::plugin::apache (
Enum['present', 'absent'] $ensure = 'present',
Boolean $manage_package = $collectd::manage_package,
Hash $instances = { 'localhost' => { 'url' => 'http://localhost/mod_status?auto' } },
Hash $instances = { 'localhost' => { 'url' => 'http://localhost/mod_status?auto' }},
Optional[Integer[1]] $interval = undef,
Optional[Array] $package_install_options = $collectd::package_install_options,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/battery.pp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
Boolean $report_degraded = false,
Boolean $query_state_fs = false,
) {

include collectd

collectd::plugin { 'battery':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/bind.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
Array[Collectd::Bind::View] $views = [],
Optional[Integer[1]] $interval = undef,
) {

include collectd

if $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/ceph.pp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
Boolean $manage_package = $collectd::manage_package,
String $package_name = 'collectd-ceph'
) {

include collectd

if $manage_package {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cgroups.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Boolean $ignore_selected = false,
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'cgroups':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/chain.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
Collectd::Filter::Target $defaulttarget = 'write',
Array $rules = []
) {

include collectd

$conf_dir = $collectd::plugin_conf_dir
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/connectivity.pp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
Boolean $manage_package = $collectd::manage_package,
Array[String[1]] $interfaces = [],
) {

include collectd

if $manage_package and $facts['os']['family'] == 'RedHat' {
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/conntrack.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
class collectd::plugin::conntrack (
Enum['present', 'absent'] $ensure = 'present',
) {

include collectd

collectd::plugin { 'conntrack':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/contextswitch.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Enum['present', 'absent'] $ensure = 'present',
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'contextswitch':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cpu.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
Boolean $subtractgueststate = true,
Optional[Integer[1]] $interval = undef,
) {

include collectd

collectd::plugin { 'cpu':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/cpufreq.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
class collectd::plugin::cpufreq (
Enum['present', 'absent'] $ensure = 'present',
) {

include collectd

collectd::plugin { 'cpufreq':
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/csv.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
$interval = undef,
$storerates = false
) {

include collectd

collectd::plugin { 'csv':
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/cuda.pp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

if ($_manage_package) and ($provider_proxy) {
$install_options = [{'--proxy' => $provider_proxy}]
$install_options = [{ '--proxy' => $provider_proxy }]
} else {
$install_options = undef
}
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/curl.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
$ensure = 'present',
$manage_package = undef,
$interval = undef,
$pages = { },
$pages = {},
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/curl/page.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
Optional[Array[Hash]] $matches = undef,
String $plugininstance = $name, # You can have multiple <Page> with the same name.
) {

include collectd
include collectd::plugin::curl

Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/curl_json.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
$order = '10',
$manage_package = undef,
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
5 changes: 2 additions & 3 deletions manifests/plugin/dbi.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# https://collectd.org/wiki/index.php/Plugin:DBI
class collectd::plugin::dbi (
$ensure = 'present',
$databases = { },
$queries = { },
$databases = {},
$queries = {},
$packages = undef,
$interval = undef,
$manage_package = undef,
) {

include collectd

$_manage_package = pick($manage_package, $collectd::manage_package)
Expand Down
3 changes: 1 addition & 2 deletions manifests/plugin/dbi/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
Array $query = [],
Optional[Integer[1]] $db_query_interval = undef,
) {

include collectd
include collectd::plugin::dbi

concat::fragment{ "collectd_plugin_dbi_conf_db_${title}":
concat::fragment { "collectd_plugin_dbi_conf_db_${title}":
order => '50',
target => "${collectd::plugin_conf_dir}/dbi-config.conf",
content => template('collectd/plugin/dbi/database.conf.erb'),
Expand Down
2 changes: 1 addition & 1 deletion manifests/plugin/dbi/query.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include collectd
include collectd::plugin::dbi

concat::fragment{ "collectd_plugin_dbi_conf_query_${title}":
concat::fragment { "collectd_plugin_dbi_conf_query_${title}":
order => '30',
target => "${collectd::plugin_conf_dir}/dbi-config.conf",
content => template('collectd/plugin/dbi/query.conf.erb'),
Expand Down
1 change: 0 additions & 1 deletion manifests/plugin/dcpmm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
Boolean $enable_dispatch_all = false,

) {

include collectd

if $collect_health and $collect_perf_metrics {
Expand Down
Loading

0 comments on commit 0decb35

Please sign in to comment.