From d831843a2d5234460903ebb7b32884910e8768f5 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Fri, 26 Jun 2020 21:42:12 +0200 Subject: [PATCH] puppet-lint: Enable whitespace checker --- Gemfile | 3 ++- examples/plugins/ceph.pp | 4 +--- examples/plugins/filecount.pp | 4 ++-- examples/plugins/perl.pp | 8 ++++---- examples/plugins/processes.pp | 2 +- examples/plugins/snmp.pp | 5 ++--- examples/purge_config.pp | 2 -- manifests/config.pp | 2 -- manifests/init.pp | 1 - manifests/install.pp | 4 +--- manifests/params.pp | 5 ++--- manifests/plugin.pp | 1 - manifests/plugin/aggregation.pp | 1 - manifests/plugin/aggregation/aggregator.pp | 1 - manifests/plugin/amqp.pp | 1 - manifests/plugin/amqp1.pp | 1 - manifests/plugin/apache.pp | 1 - manifests/plugin/battery.pp | 1 - manifests/plugin/bind.pp | 1 - manifests/plugin/ceph.pp | 1 - manifests/plugin/cgroups.pp | 1 - manifests/plugin/chain.pp | 1 - manifests/plugin/connectivity.pp | 1 - manifests/plugin/conntrack.pp | 1 - manifests/plugin/contextswitch.pp | 1 - manifests/plugin/cpu.pp | 1 - manifests/plugin/cpufreq.pp | 1 - manifests/plugin/csv.pp | 1 - manifests/plugin/cuda.pp | 2 +- manifests/plugin/curl.pp | 3 +-- manifests/plugin/curl/page.pp | 1 - manifests/plugin/curl_json.pp | 1 - manifests/plugin/dbi.pp | 5 ++--- manifests/plugin/dbi/database.pp | 3 +-- manifests/plugin/dbi/query.pp | 2 +- manifests/plugin/dcpmm.pp | 1 - manifests/plugin/df.pp | 1 - manifests/plugin/disk.pp | 1 - manifests/plugin/dns.pp | 1 - manifests/plugin/dpdk_telemetry.pp | 1 - manifests/plugin/entropy.pp | 1 - manifests/plugin/ethstat.pp | 1 - manifests/plugin/exec.pp | 7 +++---- manifests/plugin/exec/cmd.pp | 3 +-- manifests/plugin/fhcount.pp | 1 - manifests/plugin/filecount.pp | 1 - manifests/plugin/filecount/directory.pp | 1 - manifests/plugin/filter.pp | 5 ++--- manifests/plugin/filter/chain.pp | 9 ++++----- manifests/plugin/filter/match.pp | 5 ++--- manifests/plugin/filter/rule.pp | 5 ++--- manifests/plugin/filter/target.pp | 5 ++--- manifests/plugin/fscache.pp | 1 - manifests/plugin/genericjmx.pp | 1 - manifests/plugin/genericjmx/connection.pp | 1 - manifests/plugin/genericjmx/mbean.pp | 1 - manifests/plugin/hddtemp.pp | 1 - manifests/plugin/hugepages.pp | 1 - manifests/plugin/intel_pmu.pp | 1 - manifests/plugin/intel_rdt.pp | 1 - manifests/plugin/interface.pp | 1 - manifests/plugin/ipc.pp | 1 - manifests/plugin/ipmi.pp | 1 - manifests/plugin/iptables.pp | 1 - manifests/plugin/irq.pp | 1 - manifests/plugin/iscdhcp.pp | 2 +- manifests/plugin/java.pp | 1 - manifests/plugin/load.pp | 1 - manifests/plugin/logfile.pp | 1 - manifests/plugin/logparser.pp | 4 ++-- manifests/plugin/lvm.pp | 1 - manifests/plugin/mcelog.pp | 1 - manifests/plugin/memcached.pp | 1 - manifests/plugin/memory.pp | 1 - manifests/plugin/mongodb.pp | 1 - manifests/plugin/mysql.pp | 1 - manifests/plugin/mysql/database.pp | 1 - manifests/plugin/netlink.pp | 1 - manifests/plugin/network.pp | 1 - manifests/plugin/network/listener.pp | 1 - manifests/plugin/network/server.pp | 1 - manifests/plugin/nfs.pp | 1 - manifests/plugin/nginx.pp | 1 - manifests/plugin/ntpd.pp | 1 - manifests/plugin/numa.pp | 1 - manifests/plugin/nut.pp | 4 +--- manifests/plugin/nut/ups.pp | 1 - manifests/plugin/openldap.pp | 1 - manifests/plugin/openvpn.pp | 3 +-- manifests/plugin/oracle.pp | 1 - manifests/plugin/oracle/database.pp | 1 - manifests/plugin/oracle/query.pp | 1 - manifests/plugin/ovs_events.pp | 1 - manifests/plugin/ovs_stats.pp | 1 - manifests/plugin/pcie_errors.pp | 1 - manifests/plugin/perl.pp | 2 -- manifests/plugin/perl/plugin.pp | 3 +-- manifests/plugin/ping.pp | 1 - manifests/plugin/postgresql.pp | 7 +++---- manifests/plugin/postgresql/database.pp | 3 +-- manifests/plugin/postgresql/query.pp | 3 +-- manifests/plugin/postgresql/writer.pp | 3 +-- manifests/plugin/powerdns.pp | 1 - manifests/plugin/powerdns/recursor.pp | 3 +-- manifests/plugin/powerdns/server.pp | 3 +-- manifests/plugin/processes.pp | 1 - manifests/plugin/processes/process.pp | 4 +--- manifests/plugin/processes/processmatch.pp | 3 +-- manifests/plugin/procevent.pp | 1 - manifests/plugin/protocols.pp | 1 - manifests/plugin/python.pp | 1 - manifests/plugin/python/module.pp | 3 +-- manifests/plugin/rabbitmq.pp | 2 +- manifests/plugin/redis.pp | 1 - manifests/plugin/rrdcached.pp | 1 - manifests/plugin/rrdtool.pp | 1 - manifests/plugin/sensors.pp | 1 - manifests/plugin/smart.pp | 1 - manifests/plugin/snmp.pp | 1 - manifests/plugin/snmp/data.pp | 1 - manifests/plugin/snmp/host.pp | 1 - manifests/plugin/snmp_agent.pp | 5 +---- manifests/plugin/statsd.pp | 1 - manifests/plugin/swap.pp | 1 - manifests/plugin/sysevent.pp | 1 - manifests/plugin/syslog.pp | 1 - manifests/plugin/tail.pp | 1 - manifests/plugin/tail/file.pp | 1 - manifests/plugin/target_v5upgrade.pp | 1 - manifests/plugin/tcpconns.pp | 1 - manifests/plugin/thermal.pp | 1 - manifests/plugin/threshold.pp | 1 - manifests/plugin/unixsock.pp | 1 - manifests/plugin/uptime.pp | 1 - manifests/plugin/users.pp | 1 - manifests/plugin/uuid.pp | 1 - manifests/plugin/varnish.pp | 1 - manifests/plugin/virt.pp | 3 +-- manifests/plugin/vmem.pp | 1 - manifests/plugin/write_graphite.pp | 1 - manifests/plugin/write_graphite/carbon.pp | 1 - manifests/plugin/write_http.pp | 3 +-- manifests/plugin/write_kafka.pp | 3 +-- manifests/plugin/write_log.pp | 1 - manifests/plugin/write_network.pp | 3 +-- manifests/plugin/write_prometheus.pp | 1 - manifests/plugin/write_riemann.pp | 1 - manifests/plugin/write_sensu.pp | 1 - manifests/plugin/write_tsdb.pp | 3 +-- manifests/plugin/zfs_arc.pp | 1 - manifests/plugin/zookeeper.pp | 1 - manifests/repo.pp | 5 +---- manifests/repo/debian.pp | 3 --- manifests/repo/redhat.pp | 4 ---- manifests/service.pp | 2 -- manifests/typesdb.pp | 1 - 156 files changed, 62 insertions(+), 225 deletions(-) diff --git a/Gemfile b/Gemfile index 32c311460..81faf742a 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,8 @@ def location_for(place, fake_version = nil) end group :test do - gem 'voxpupuli-test', '>= 1.0.0', :require => false + gem 'voxpupuli-test', '>= 1.4.0', :require => false + gem 'puppet-lint-manifest_whitespace-check', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false end diff --git a/examples/plugins/ceph.pp b/examples/plugins/ceph.pp index cc30b53c4..6b2aa034f 100644 --- a/examples/plugins/ceph.pp +++ b/examples/plugins/ceph.pp @@ -1,7 +1,5 @@ include collectd class { 'collectd::plugin::ceph': - osds => [ 'osd.0', 'osd.1', 'osd.2'], + osds => ['osd.0', 'osd.1', 'osd.2'], } - - diff --git a/examples/plugins/filecount.pp b/examples/plugins/filecount.pp index 993f426d0..9b75b132b 100644 --- a/examples/plugins/filecount.pp +++ b/examples/plugins/filecount.pp @@ -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', diff --git a/examples/plugins/perl.pp b/examples/plugins/perl.pp index 45235fa64..b5eb2e4b4 100644 --- a/examples/plugins/perl.pp +++ b/examples/plugins/perl.pp @@ -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 { @@ -44,10 +44,10 @@ 'foo' => 'bar', 'more' => { 'complex' => 'structure', - 'no' => [ 'a', 'b' ], + 'no' => ['a', 'b'], 'yes' => { 'last' => 'level', - 'and' => [ 'array' , 'thing' ], + 'and' => ['array' , 'thing'], }, }, }, diff --git a/examples/plugins/processes.pp b/examples/plugins/processes.pp index e333e4dd3..0679c05ea 100644 --- a/examples/plugins/processes.pp +++ b/examples/plugins/processes.pp @@ -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]' }, diff --git a/examples/plugins/snmp.pp b/examples/plugins/snmp.pp index c8d81e014..8676dbc3b 100644 --- a/examples/plugins/snmp.pp +++ b/examples/plugins/snmp.pp @@ -1,7 +1,7 @@ include collectd -class {'collectd::plugin::snmp': - data => { +class { 'collectd::plugin::snmp': + data => { amavis_incoming_messages => { 'type' => 'counter', 'table' => false, @@ -19,4 +19,3 @@ }, }, } - diff --git a/examples/purge_config.pp b/examples/purge_config.pp index 858dcc403..fd69196d3 100644 --- a/examples/purge_config.pp +++ b/examples/purge_config.pp @@ -4,7 +4,6 @@ purge_config => true, } - collectd::plugin { 'battery': } collectd::plugin { 'cpu': } collectd::plugin { 'df': } @@ -18,4 +17,3 @@ collectd::plugin { 'processes': } collectd::plugin { 'swap': } collectd::plugin { 'users': } - diff --git a/manifests/config.pp b/manifests/config.pp index fe06e83ff..20632b36b 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -1,6 +1,5 @@ # private class collectd::config inherits collectd { - assert_private() $_conf_content = $collectd::purge_config ? { @@ -42,5 +41,4 @@ } File['collectd.d'] -> Concat <| tag == 'collectd' |> - } diff --git a/manifests/init.pp b/manifests/init.pp index f22f1964b..ff1f25b9e 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -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 diff --git a/manifests/install.pp b/manifests/install.pp index 8efec4cef..b30513763 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -1,7 +1,6 @@ # @summary installs collectd # @api private class collectd::install { - assert_private() if $collectd::manage_package { @@ -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, } } - } diff --git a/manifests/params.pp b/manifests/params.pp index 0cb76bef8..cf8a76b70 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,6 +1,5 @@ # class collectd::params { - $autoloadplugin = false $fqdnlookup = true $collectd_hostname = $facts['networking']['hostname'] @@ -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' @@ -38,7 +37,7 @@ 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" diff --git a/manifests/plugin.pp b/manifests/plugin.pp index ed138757f..3d28b67dc 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -8,7 +8,6 @@ $plugin = $name, Optional[Integer] $flushinterval = undef, ) { - include collectd $conf_dir = $collectd::plugin_conf_dir diff --git a/manifests/plugin/aggregation.pp b/manifests/plugin/aggregation.pp index 93471422e..d5251914d 100644 --- a/manifests/plugin/aggregation.pp +++ b/manifests/plugin/aggregation.pp @@ -4,7 +4,6 @@ Optional[Integer[1]] $interval = undef, Hash $aggregators = {}, ) { - include collectd collectd::plugin { 'aggregation': diff --git a/manifests/plugin/aggregation/aggregator.pp b/manifests/plugin/aggregation/aggregator.pp index 87a85908f..6f7196bd3 100644 --- a/manifests/plugin/aggregation/aggregator.pp +++ b/manifests/plugin/aggregation/aggregator.pp @@ -18,7 +18,6 @@ Optional[Boolean] $calculatemaximum = undef, Optional[Boolean] $calculatestddev = undef, ) { - include collectd include collectd::plugin::aggregation diff --git a/manifests/plugin/amqp.pp b/manifests/plugin/amqp.pp index 85a169e1c..855a7f1f2 100644 --- a/manifests/plugin/amqp.pp +++ b/manifests/plugin/amqp.pp @@ -18,7 +18,6 @@ Boolean $graphiteseparateinstances = false, Boolean $graphitealwaysappendds = false, ) { - include collectd if $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/amqp1.pp b/manifests/plugin/amqp1.pp index 83c94f2e8..68afad45a 100644 --- a/manifests/plugin/amqp1.pp +++ b/manifests/plugin/amqp1.pp @@ -112,7 +112,6 @@ Optional[Integer] $retry_delay = undef, Optional[Integer] $interval = undef, ) { - include collectd if $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/apache.pp b/manifests/plugin/apache.pp index 68435011d..3cf9b4f64 100644 --- a/manifests/plugin/apache.pp +++ b/manifests/plugin/apache.pp @@ -6,7 +6,6 @@ Optional[Integer[1]] $interval = undef, Optional[Array] $package_install_options = $collectd::package_install_options, ) { - include collectd if $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/battery.pp b/manifests/plugin/battery.pp index 49b332076..8f1779a45 100644 --- a/manifests/plugin/battery.pp +++ b/manifests/plugin/battery.pp @@ -40,7 +40,6 @@ Boolean $report_degraded = false, Boolean $query_state_fs = false, ) { - include collectd collectd::plugin { 'battery': diff --git a/manifests/plugin/bind.pp b/manifests/plugin/bind.pp index a69888bdf..cfe607234 100644 --- a/manifests/plugin/bind.pp +++ b/manifests/plugin/bind.pp @@ -13,7 +13,6 @@ Array[Collectd::Bind::View] $views = [], Optional[Integer[1]] $interval = undef, ) { - include collectd if $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/ceph.pp b/manifests/plugin/ceph.pp index c63c9ea36..734dcfa3e 100644 --- a/manifests/plugin/ceph.pp +++ b/manifests/plugin/ceph.pp @@ -41,7 +41,6 @@ Boolean $manage_package = $collectd::manage_package, String $package_name = 'collectd-ceph' ) { - include collectd if $manage_package { diff --git a/manifests/plugin/cgroups.pp b/manifests/plugin/cgroups.pp index 3c0f7c931..ca9091bd6 100644 --- a/manifests/plugin/cgroups.pp +++ b/manifests/plugin/cgroups.pp @@ -5,7 +5,6 @@ Boolean $ignore_selected = false, Optional[Integer[1]] $interval = undef, ) { - include collectd collectd::plugin { 'cgroups': diff --git a/manifests/plugin/chain.pp b/manifests/plugin/chain.pp index 0c4d9adda..b4253cd3c 100644 --- a/manifests/plugin/chain.pp +++ b/manifests/plugin/chain.pp @@ -5,7 +5,6 @@ Collectd::Filter::Target $defaulttarget = 'write', Array $rules = [] ) { - include collectd $conf_dir = $collectd::plugin_conf_dir diff --git a/manifests/plugin/connectivity.pp b/manifests/plugin/connectivity.pp index d30724b9a..556874892 100644 --- a/manifests/plugin/connectivity.pp +++ b/manifests/plugin/connectivity.pp @@ -24,7 +24,6 @@ Boolean $manage_package = $collectd::manage_package, Array[String[1]] $interfaces = [], ) { - include collectd if $manage_package and $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/conntrack.pp b/manifests/plugin/conntrack.pp index f870f89c9..cdf154549 100644 --- a/manifests/plugin/conntrack.pp +++ b/manifests/plugin/conntrack.pp @@ -2,7 +2,6 @@ class collectd::plugin::conntrack ( Enum['present', 'absent'] $ensure = 'present', ) { - include collectd collectd::plugin { 'conntrack': diff --git a/manifests/plugin/contextswitch.pp b/manifests/plugin/contextswitch.pp index 07e1be54a..d023d7fd9 100644 --- a/manifests/plugin/contextswitch.pp +++ b/manifests/plugin/contextswitch.pp @@ -3,7 +3,6 @@ Enum['present', 'absent'] $ensure = 'present', Optional[Integer[1]] $interval = undef, ) { - include collectd collectd::plugin { 'contextswitch': diff --git a/manifests/plugin/cpu.pp b/manifests/plugin/cpu.pp index d019953a1..bb9a1d140 100644 --- a/manifests/plugin/cpu.pp +++ b/manifests/plugin/cpu.pp @@ -9,7 +9,6 @@ Boolean $subtractgueststate = true, Optional[Integer[1]] $interval = undef, ) { - include collectd collectd::plugin { 'cpu': diff --git a/manifests/plugin/cpufreq.pp b/manifests/plugin/cpufreq.pp index 1951ab3d6..fce68b40a 100644 --- a/manifests/plugin/cpufreq.pp +++ b/manifests/plugin/cpufreq.pp @@ -2,7 +2,6 @@ class collectd::plugin::cpufreq ( Enum['present', 'absent'] $ensure = 'present', ) { - include collectd collectd::plugin { 'cpufreq': diff --git a/manifests/plugin/csv.pp b/manifests/plugin/csv.pp index 8b3b7b71b..ce9b2dd67 100644 --- a/manifests/plugin/csv.pp +++ b/manifests/plugin/csv.pp @@ -5,7 +5,6 @@ $interval = undef, $storerates = false ) { - include collectd collectd::plugin { 'csv': diff --git a/manifests/plugin/cuda.pp b/manifests/plugin/cuda.pp index 6ffc0e5ee..cff05bae7 100644 --- a/manifests/plugin/cuda.pp +++ b/manifests/plugin/cuda.pp @@ -59,7 +59,7 @@ } if ($_manage_package) and ($provider_proxy) { - $install_options = [{'--proxy' => $provider_proxy}] + $install_options = [{ '--proxy' => $provider_proxy }] } else { $install_options = undef } diff --git a/manifests/plugin/curl.pp b/manifests/plugin/curl.pp index 91c48cd55..236082b60 100644 --- a/manifests/plugin/curl.pp +++ b/manifests/plugin/curl.pp @@ -3,9 +3,8 @@ $ensure = 'present', $manage_package = undef, $interval = undef, - $pages = { }, + $pages = {}, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/curl/page.pp b/manifests/plugin/curl/page.pp index 9d91b3f5f..758607cca 100644 --- a/manifests/plugin/curl/page.pp +++ b/manifests/plugin/curl/page.pp @@ -13,7 +13,6 @@ Optional[Array[Hash]] $matches = undef, String $plugininstance = $name, # You can have multiple with the same name. ) { - include collectd include collectd::plugin::curl diff --git a/manifests/plugin/curl_json.pp b/manifests/plugin/curl_json.pp index b8495be69..d1895b5b0 100644 --- a/manifests/plugin/curl_json.pp +++ b/manifests/plugin/curl_json.pp @@ -18,7 +18,6 @@ $order = '10', $manage_package = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/dbi.pp b/manifests/plugin/dbi.pp index 668e18355..8bb68e1ea 100644 --- a/manifests/plugin/dbi.pp +++ b/manifests/plugin/dbi.pp @@ -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) diff --git a/manifests/plugin/dbi/database.pp b/manifests/plugin/dbi/database.pp index 854426309..88c8f28f9 100644 --- a/manifests/plugin/dbi/database.pp +++ b/manifests/plugin/dbi/database.pp @@ -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'), diff --git a/manifests/plugin/dbi/query.pp b/manifests/plugin/dbi/query.pp index b0fe71cd8..f465a6cae 100644 --- a/manifests/plugin/dbi/query.pp +++ b/manifests/plugin/dbi/query.pp @@ -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'), diff --git a/manifests/plugin/dcpmm.pp b/manifests/plugin/dcpmm.pp index 31da1208c..04b15f62e 100644 --- a/manifests/plugin/dcpmm.pp +++ b/manifests/plugin/dcpmm.pp @@ -17,7 +17,6 @@ Boolean $enable_dispatch_all = false, ) { - include collectd if $collect_health and $collect_perf_metrics { diff --git a/manifests/plugin/df.pp b/manifests/plugin/df.pp index 84f85d29f..6d7241764 100644 --- a/manifests/plugin/df.pp +++ b/manifests/plugin/df.pp @@ -12,7 +12,6 @@ Boolean $valuesabsolute = true, Boolean $valuespercentage = false, ) { - include collectd collectd::plugin { 'df': diff --git a/manifests/plugin/disk.pp b/manifests/plugin/disk.pp index bc2282cb0..d9dd9b02e 100644 --- a/manifests/plugin/disk.pp +++ b/manifests/plugin/disk.pp @@ -9,7 +9,6 @@ $udevnameattr = undef, Optional[Array[String]] $package_install_options = undef ) { - include collectd if $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/dns.pp b/manifests/plugin/dns.pp index a4e09d197..a9668c35e 100644 --- a/manifests/plugin/dns.pp +++ b/manifests/plugin/dns.pp @@ -9,7 +9,6 @@ $package_name = 'collectd-dns', Variant[String,Boolean] $selectnumericquerytypes = true, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/dpdk_telemetry.pp b/manifests/plugin/dpdk_telemetry.pp index 9232b3279..cf606f26c 100644 --- a/manifests/plugin/dpdk_telemetry.pp +++ b/manifests/plugin/dpdk_telemetry.pp @@ -18,7 +18,6 @@ Stdlib::Absolutepath $client_socket_path = '/var/run/.client', Stdlib::Absolutepath $dpdk_socket_path = '/var/run/dpdk/rte/telemetry', ) { - include collectd collectd::plugin { 'dpdk_telemetry': diff --git a/manifests/plugin/entropy.pp b/manifests/plugin/entropy.pp index 0c8022497..0c0b2ee6c 100644 --- a/manifests/plugin/entropy.pp +++ b/manifests/plugin/entropy.pp @@ -3,7 +3,6 @@ $ensure = 'present', $interval = undef, ) { - include collectd collectd::plugin { 'entropy': diff --git a/manifests/plugin/ethstat.pp b/manifests/plugin/ethstat.pp index a5e7ff4c9..f02941a6b 100644 --- a/manifests/plugin/ethstat.pp +++ b/manifests/plugin/ethstat.pp @@ -6,7 +6,6 @@ $mappedonly = false, $interval = undef, ) { - include collectd collectd::plugin { 'ethstat': diff --git a/manifests/plugin/exec.pp b/manifests/plugin/exec.pp index 6ffe10b1f..c63f109d9 100644 --- a/manifests/plugin/exec.pp +++ b/manifests/plugin/exec.pp @@ -6,7 +6,6 @@ $ensure = 'present', Boolean $globals = false, ) { - include collectd collectd::plugin { 'exec': @@ -18,7 +17,7 @@ # should be loaded after global plugin configuration $exec_conf = "${collectd::plugin_conf_dir}/exec-config.conf" - concat{ $exec_conf: + concat { $exec_conf: ensure => $ensure, mode => $collectd::config_mode, owner => $collectd::config_owner, @@ -27,13 +26,13 @@ ensure_newline => true, } - concat::fragment{ 'collectd_plugin_exec_conf_header': + concat::fragment { 'collectd_plugin_exec_conf_header': order => '00', content => '', target => $exec_conf, } - concat::fragment{ 'collectd_plugin_exec_conf_footer': + concat::fragment { 'collectd_plugin_exec_conf_footer': order => '99', content => '', target => $exec_conf, diff --git a/manifests/plugin/exec/cmd.pp b/manifests/plugin/exec/cmd.pp index 34e77b165..3bf93cb99 100644 --- a/manifests/plugin/exec/cmd.pp +++ b/manifests/plugin/exec/cmd.pp @@ -4,11 +4,10 @@ Array $exec = [], Array $notification_exec = [], ) { - include collectd include collectd::plugin::exec - concat::fragment{ "collectd_plugin_exec_conf_${title}": + concat::fragment { "collectd_plugin_exec_conf_${title}": order => '50', # somewhere between header and footer target => $collectd::plugin::exec::exec_conf, content => template('collectd/plugin/exec/cmd.conf.erb'), diff --git a/manifests/plugin/fhcount.pp b/manifests/plugin/fhcount.pp index f396c99f9..6f1177f7c 100644 --- a/manifests/plugin/fhcount.pp +++ b/manifests/plugin/fhcount.pp @@ -5,7 +5,6 @@ Boolean $valuespercentage = false, $interval = undef, ) { - include collectd collectd::plugin { 'fhcount': diff --git a/manifests/plugin/filecount.pp b/manifests/plugin/filecount.pp index e75cc8c9e..28d065a0d 100644 --- a/manifests/plugin/filecount.pp +++ b/manifests/plugin/filecount.pp @@ -4,7 +4,6 @@ Hash $directories = {}, $interval = undef, ) { - include collectd # We support two formats for directories: diff --git a/manifests/plugin/filecount/directory.pp b/manifests/plugin/filecount/directory.pp index 7418d67ef..3eba6dafa 100644 --- a/manifests/plugin/filecount/directory.pp +++ b/manifests/plugin/filecount/directory.pp @@ -9,7 +9,6 @@ Optional[Boolean] $recursive = undef, Optional[Boolean] $includehidden = undef, ) { - include collectd include collectd::plugin::filecount diff --git a/manifests/plugin/filter.pp b/manifests/plugin/filter.pp index 152387f94..218d6e1fd 100644 --- a/manifests/plugin/filter.pp +++ b/manifests/plugin/filter.pp @@ -21,8 +21,7 @@ unless $ensure == 'present' { #kick all filter specifc plugins - ensure_resource('collectd::plugin', prefix($plugin_matches,'match_'), { 'ensure' => 'absent', 'order' => '02'} ) - ensure_resource('collectd::plugin', prefix($plugin_targets,'target_'), { 'ensure' => 'absent', 'order' => '02'} ) + ensure_resource('collectd::plugin', prefix($plugin_matches,'match_'), { 'ensure' => 'absent', 'order' => '02' }) + ensure_resource('collectd::plugin', prefix($plugin_targets,'target_'), { 'ensure' => 'absent', 'order' => '02' }) } - } diff --git a/manifests/plugin/filter/chain.pp b/manifests/plugin/filter/chain.pp index 3bba55da7..ac22b7f94 100644 --- a/manifests/plugin/filter/chain.pp +++ b/manifests/plugin/filter/chain.pp @@ -4,13 +4,12 @@ Optional[Collectd::Filter::Target] $target = undef, Optional[Hash] $target_options = undef, ) { - include collectd include collectd::plugin::filter $conf_file = "${collectd::plugin_conf_dir}/filter-chain-${title}.conf" - concat{ $conf_file: + concat { $conf_file: ensure => $ensure, mode => $collectd::config_mode, owner => $collectd::config_owner, @@ -20,13 +19,13 @@ } if $ensure == 'present' { - concat::fragment{ "${conf_file}_${title}_head": + concat::fragment { "${conf_file}_${title}_head": order => '00', content => "", target => $conf_file, } - concat::fragment{ "${conf_file}_${title}_footer": + concat::fragment { "${conf_file}_${title}_footer": order => '99', content => '', target => $conf_file, @@ -34,7 +33,7 @@ #add simple target if provided at the end if $target { - collectd::plugin::filter::target{ "z_chain-${title}-target": + collectd::plugin::filter::target { "z_chain-${title}-target": chain => $title, plugin => $target, rule => undef, diff --git a/manifests/plugin/filter/match.pp b/manifests/plugin/filter/match.pp index 517aa0b30..6848203ab 100644 --- a/manifests/plugin/filter/match.pp +++ b/manifests/plugin/filter/match.pp @@ -5,16 +5,15 @@ Collectd::Filter::Match $plugin, Optional[Hash] $options = undef, ) { - include collectd include collectd::plugin::filter - ensure_resource('collectd::plugin', "match_${plugin}", { 'order' => '02'} ) + ensure_resource('collectd::plugin', "match_${plugin}", { 'order' => '02' }) $fragment_order = "10_${rule}_1_${title}" $conf_file = "${collectd::plugin_conf_dir}/filter-chain-${chain}.conf" - concat::fragment{ "${conf_file}_${fragment_order}": + concat::fragment { "${conf_file}_${fragment_order}": order => $fragment_order, content => template('collectd/plugin/filter/match.erb'), target => $conf_file, diff --git a/manifests/plugin/filter/rule.pp b/manifests/plugin/filter/rule.pp index b4a3c8cca..65d9050fb 100644 --- a/manifests/plugin/filter/rule.pp +++ b/manifests/plugin/filter/rule.pp @@ -2,20 +2,19 @@ define collectd::plugin::filter::rule ( String $chain, ) { - include collectd include collectd::plugin::filter $fragment_order = "10_${title}" $conf_file = "${collectd::plugin_conf_dir}/filter-chain-${chain}.conf" - concat::fragment{ "${conf_file}_${fragment_order}_0": + concat::fragment { "${conf_file}_${fragment_order}_0": order => "${fragment_order}_0", content => " ", target => $conf_file, } - concat::fragment{ "${conf_file}_${fragment_order}_99": + concat::fragment { "${conf_file}_${fragment_order}_99": order => "${fragment_order}_99", content => ' ', target => $conf_file, diff --git a/manifests/plugin/filter/target.pp b/manifests/plugin/filter/target.pp index 3757a22e9..068d3acc4 100644 --- a/manifests/plugin/filter/target.pp +++ b/manifests/plugin/filter/target.pp @@ -5,14 +5,13 @@ Optional[Hash] $options = undef, Optional[String] $rule = undef, ) { - include collectd include collectd::plugin::filter # Load plugins if $plugin in $collectd::plugin::filter::plugin_targets { $order = 30 - ensure_resource('collectd::plugin', "target_${plugin}", { 'order' => '02'} ) + ensure_resource('collectd::plugin', "target_${plugin}", { 'order' => '02' }) } else { # Built in plugins $order = 50 @@ -28,7 +27,7 @@ $conf_file = "${collectd::plugin_conf_dir}/filter-chain-${chain}.conf" - concat::fragment{ "${conf_file}_${fragment_order}": + concat::fragment { "${conf_file}_${fragment_order}": order => $fragment_order, content => template('collectd/plugin/filter/target.erb'), target => $conf_file, diff --git a/manifests/plugin/fscache.pp b/manifests/plugin/fscache.pp index 56621ad0c..81627e103 100644 --- a/manifests/plugin/fscache.pp +++ b/manifests/plugin/fscache.pp @@ -2,7 +2,6 @@ class collectd::plugin::fscache ( $ensure = 'present', ) { - include collectd collectd::plugin { 'fscache': diff --git a/manifests/plugin/genericjmx.pp b/manifests/plugin/genericjmx.pp index f7ecbf6b0..70257059e 100644 --- a/manifests/plugin/genericjmx.pp +++ b/manifests/plugin/genericjmx.pp @@ -4,7 +4,6 @@ $jvmarg = [], $manage_package = undef, ) { - include collectd include collectd::plugin::java diff --git a/manifests/plugin/genericjmx/connection.pp b/manifests/plugin/genericjmx/connection.pp index 666a0399f..958f0b1d5 100644 --- a/manifests/plugin/genericjmx/connection.pp +++ b/manifests/plugin/genericjmx/connection.pp @@ -7,7 +7,6 @@ Optional[String] $password = undef, Optional[String] $instance_prefix = undef, ) { - include collectd include collectd::plugin::genericjmx diff --git a/manifests/plugin/genericjmx/mbean.pp b/manifests/plugin/genericjmx/mbean.pp index 8e18ac7d4..e3ea9f3ea 100644 --- a/manifests/plugin/genericjmx/mbean.pp +++ b/manifests/plugin/genericjmx/mbean.pp @@ -5,7 +5,6 @@ Optional[String] $instance_prefix = undef, Array $instance_from = [], ) { - include collectd include collectd::plugin::genericjmx diff --git a/manifests/plugin/hddtemp.pp b/manifests/plugin/hddtemp.pp index c94f6c399..6d5e1e9bb 100644 --- a/manifests/plugin/hddtemp.pp +++ b/manifests/plugin/hddtemp.pp @@ -5,7 +5,6 @@ $ensure = 'present', $interval = undef, ) { - include collectd collectd::plugin { 'hddtemp': diff --git a/manifests/plugin/hugepages.pp b/manifests/plugin/hugepages.pp index 41341c1b4..1c78981d5 100644 --- a/manifests/plugin/hugepages.pp +++ b/manifests/plugin/hugepages.pp @@ -48,7 +48,6 @@ Boolean $values_bytes = false, Boolean $values_percentage = false, ) { - include collectd collectd::plugin { 'hugepages': diff --git a/manifests/plugin/intel_pmu.pp b/manifests/plugin/intel_pmu.pp index e1f6ea6f9..ed3873660 100644 --- a/manifests/plugin/intel_pmu.pp +++ b/manifests/plugin/intel_pmu.pp @@ -7,7 +7,6 @@ Optional[String] $event_list = undef, Optional[Array[String]] $hardware_events = undef, ) { - include collectd if $hardware_events and $event_list == undef { diff --git a/manifests/plugin/intel_rdt.pp b/manifests/plugin/intel_rdt.pp index 925523d94..956e0443e 100644 --- a/manifests/plugin/intel_rdt.pp +++ b/manifests/plugin/intel_rdt.pp @@ -31,7 +31,6 @@ Optional[Integer] $interval = undef, Array[String[1]] $cores = [], ) { - include collectd collectd::plugin { 'intel_rdt': diff --git a/manifests/plugin/interface.pp b/manifests/plugin/interface.pp index 6190a62ff..f4f80313c 100644 --- a/manifests/plugin/interface.pp +++ b/manifests/plugin/interface.pp @@ -6,7 +6,6 @@ Boolean $reportinactive = true, $interval = undef, ) { - include collectd collectd::plugin { 'interface': diff --git a/manifests/plugin/ipc.pp b/manifests/plugin/ipc.pp index ba5206ead..e8fb8f90f 100644 --- a/manifests/plugin/ipc.pp +++ b/manifests/plugin/ipc.pp @@ -14,7 +14,6 @@ class collectd::plugin::ipc ( Enum['present', 'absent'] $ensure = 'present', ) { - include collectd collectd::plugin { 'ipc': diff --git a/manifests/plugin/ipmi.pp b/manifests/plugin/ipmi.pp index 285fabcab..b4313ad23 100644 --- a/manifests/plugin/ipmi.pp +++ b/manifests/plugin/ipmi.pp @@ -10,7 +10,6 @@ Boolean $notify_sensor_not_present = false, Array $sensors = [], ) { - include collectd $manage_package_real = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/iptables.pp b/manifests/plugin/iptables.pp index d0112bf9a..29d7a3e51 100644 --- a/manifests/plugin/iptables.pp +++ b/manifests/plugin/iptables.pp @@ -7,7 +7,6 @@ Hash $chains6 = {}, $interval = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/irq.pp b/manifests/plugin/irq.pp index 4cd0678f9..ac0a9e973 100644 --- a/manifests/plugin/irq.pp +++ b/manifests/plugin/irq.pp @@ -5,7 +5,6 @@ Boolean $ignoreselected = false, $interval = undef, ) { - include collectd collectd::plugin { 'irq': diff --git a/manifests/plugin/iscdhcp.pp b/manifests/plugin/iscdhcp.pp index 626842dde..34ae45ab3 100644 --- a/manifests/plugin/iscdhcp.pp +++ b/manifests/plugin/iscdhcp.pp @@ -59,7 +59,7 @@ } if ($_manage_package) and ($provider_proxy) { - $install_options = [{'--proxy' => $provider_proxy}] + $install_options = [{ '--proxy' => $provider_proxy }] } else { $install_options = undef } diff --git a/manifests/plugin/java.pp b/manifests/plugin/java.pp index 589fddf23..bae9ee400 100644 --- a/manifests/plugin/java.pp +++ b/manifests/plugin/java.pp @@ -7,7 +7,6 @@ $manage_package = undef, Optional[Stdlib::Absolutepath] $java_home = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/load.pp b/manifests/plugin/load.pp index baaece98a..ab5112ea8 100644 --- a/manifests/plugin/load.pp +++ b/manifests/plugin/load.pp @@ -4,7 +4,6 @@ $interval = undef, $report_relative = false, ) { - include collectd collectd::plugin { 'load': diff --git a/manifests/plugin/logfile.pp b/manifests/plugin/logfile.pp index 23c64fc8c..b0503498b 100644 --- a/manifests/plugin/logfile.pp +++ b/manifests/plugin/logfile.pp @@ -7,7 +7,6 @@ $log_timestamp = true, $print_severity = false ) { - include collectd collectd::plugin { 'logfile': diff --git a/manifests/plugin/logparser.pp b/manifests/plugin/logparser.pp index b6a844ec2..f2bc8b527 100644 --- a/manifests/plugin/logparser.pp +++ b/manifests/plugin/logparser.pp @@ -19,7 +19,7 @@ 'ismandatory' => false, }, 'root port' => { - 'regex' =>'pcieport (.*): AER:', + 'regex' => 'pcieport (.*): AER:', 'submatchidx' => 1, 'ismandatory' => true, }, @@ -63,7 +63,7 @@ ], } }] -){ +) { include collectd collectd::plugin { 'logparser': diff --git a/manifests/plugin/lvm.pp b/manifests/plugin/lvm.pp index 249a91b7f..b4cdc5483 100644 --- a/manifests/plugin/lvm.pp +++ b/manifests/plugin/lvm.pp @@ -4,7 +4,6 @@ $manage_package = undef, $interval = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/mcelog.pp b/manifests/plugin/mcelog.pp index 0bbb6e129..c8a602d15 100644 --- a/manifests/plugin/mcelog.pp +++ b/manifests/plugin/mcelog.pp @@ -8,7 +8,6 @@ 'persistentnotification' => false, } ) { - include collectd collectd::plugin { 'mcelog': diff --git a/manifests/plugin/memcached.pp b/manifests/plugin/memcached.pp index 53d6905be..ec40b172a 100644 --- a/manifests/plugin/memcached.pp +++ b/manifests/plugin/memcached.pp @@ -10,7 +10,6 @@ }, $interval = undef, ) { - include collectd collectd::plugin { 'memcached': diff --git a/manifests/plugin/memory.pp b/manifests/plugin/memory.pp index 64baaf4f2..a8c26869f 100644 --- a/manifests/plugin/memory.pp +++ b/manifests/plugin/memory.pp @@ -5,7 +5,6 @@ Boolean $valuespercentage = false, $interval = undef, ) { - include collectd collectd::plugin { 'memory': diff --git a/manifests/plugin/mongodb.pp b/manifests/plugin/mongodb.pp index 49f5be7fd..f4ef88947 100644 --- a/manifests/plugin/mongodb.pp +++ b/manifests/plugin/mongodb.pp @@ -10,7 +10,6 @@ Optional[Array] $configured_dbs = undef, $collectd_dir = '/usr/lib/collectd', ) { - include collectd if $configured_dbs { diff --git a/manifests/plugin/mysql.pp b/manifests/plugin/mysql.pp index 98e048b2b..a38fb7237 100644 --- a/manifests/plugin/mysql.pp +++ b/manifests/plugin/mysql.pp @@ -5,7 +5,6 @@ $manage_package = undef, $interval = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/mysql/database.pp b/manifests/plugin/mysql/database.pp index 95174b9dc..3468e3654 100644 --- a/manifests/plugin/mysql/database.pp +++ b/manifests/plugin/mysql/database.pp @@ -21,7 +21,6 @@ Optional[String] $sslcapath = undef, Optional[String] $sslcipher = undef, ) { - include collectd include collectd::plugin::mysql diff --git a/manifests/plugin/netlink.pp b/manifests/plugin/netlink.pp index 13e0a444a..cae703426 100644 --- a/manifests/plugin/netlink.pp +++ b/manifests/plugin/netlink.pp @@ -10,7 +10,6 @@ Boolean $ignoreselected = false, $interval = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/network.pp b/manifests/plugin/network.pp index d81f27c3b..3ed6fd80c 100644 --- a/manifests/plugin/network.pp +++ b/manifests/plugin/network.pp @@ -9,7 +9,6 @@ Hash $listeners = {}, Hash $servers = {}, ) { - include collectd $listeners_defaults = { diff --git a/manifests/plugin/network/listener.pp b/manifests/plugin/network/listener.pp index 7807b2c9a..4a2c70f14 100644 --- a/manifests/plugin/network/listener.pp +++ b/manifests/plugin/network/listener.pp @@ -6,7 +6,6 @@ Optional[Collectd::Network::SecurityLevel] $securitylevel = undef, Optional[String] $interface = undef, ) { - include collectd include collectd::plugin::network diff --git a/manifests/plugin/network/server.pp b/manifests/plugin/network/server.pp index e9a6d6d51..8587f63fe 100644 --- a/manifests/plugin/network/server.pp +++ b/manifests/plugin/network/server.pp @@ -9,7 +9,6 @@ Optional[Boolean] $forward = undef, Optional[Integer[1]] $resolveinterval = undef, ) { - include collectd include collectd::plugin::network diff --git a/manifests/plugin/nfs.pp b/manifests/plugin/nfs.pp index c51c395f8..cab6959b0 100644 --- a/manifests/plugin/nfs.pp +++ b/manifests/plugin/nfs.pp @@ -3,7 +3,6 @@ $ensure = 'present', $interval = undef, ) { - include collectd collectd::plugin { 'nfs': diff --git a/manifests/plugin/nginx.pp b/manifests/plugin/nginx.pp index 02f86b791..25aa05876 100644 --- a/manifests/plugin/nginx.pp +++ b/manifests/plugin/nginx.pp @@ -10,7 +10,6 @@ $cacert = undef, $interval = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/ntpd.pp b/manifests/plugin/ntpd.pp index 7cf7d410e..c7260933a 100644 --- a/manifests/plugin/ntpd.pp +++ b/manifests/plugin/ntpd.pp @@ -7,7 +7,6 @@ $includeunitid = false, $interval = undef, ) { - include collectd collectd::plugin { 'ntpd': diff --git a/manifests/plugin/numa.pp b/manifests/plugin/numa.pp index def59e5cc..45e60e79e 100644 --- a/manifests/plugin/numa.pp +++ b/manifests/plugin/numa.pp @@ -14,7 +14,6 @@ class collectd::plugin::numa ( Enum['present', 'absent'] $ensure = 'present', ) { - include collectd collectd::plugin { 'numa': diff --git a/manifests/plugin/nut.pp b/manifests/plugin/nut.pp index 078164a0c..bbd0b176a 100644 --- a/manifests/plugin/nut.pp +++ b/manifests/plugin/nut.pp @@ -1,12 +1,10 @@ # https://collectd.org/wiki/index.php/Plugin:Nut class collectd::plugin::nut ( $ensure = 'present', - $upss = { }, + $upss = {}, ) { - include collectd - collectd::plugin { 'nut': ensure => $ensure, } diff --git a/manifests/plugin/nut/ups.pp b/manifests/plugin/nut/ups.pp index b9d3910ad..28729b8be 100644 --- a/manifests/plugin/nut/ups.pp +++ b/manifests/plugin/nut/ups.pp @@ -2,7 +2,6 @@ define collectd::plugin::nut::ups ( $ensure = 'present', ) { - include collectd include collectd::plugin::nut diff --git a/manifests/plugin/openldap.pp b/manifests/plugin/openldap.pp index 57c8abb3f..110ab9f49 100644 --- a/manifests/plugin/openldap.pp +++ b/manifests/plugin/openldap.pp @@ -4,7 +4,6 @@ Hash $instances = { 'localhost' => { 'url' => 'ldap://localhost/' } }, $interval = undef, ) { - include collectd collectd::plugin { 'openldap': diff --git a/manifests/plugin/openvpn.pp b/manifests/plugin/openvpn.pp index 1187c86c1..14114d7d4 100644 --- a/manifests/plugin/openvpn.pp +++ b/manifests/plugin/openvpn.pp @@ -8,11 +8,10 @@ Boolean $collectusercount = false, $interval = undef, ) { - include collectd if $statusfile =~ String { - $statusfiles = [ $statusfile ] + $statusfiles = [$statusfile] } else { $statusfiles = $statusfile } diff --git a/manifests/plugin/oracle.pp b/manifests/plugin/oracle.pp index 9ce3e6a9e..e5d5e6943 100644 --- a/manifests/plugin/oracle.pp +++ b/manifests/plugin/oracle.pp @@ -5,7 +5,6 @@ Boolean $manage_package = false, Optional[Integer[1]] $interval = undef, ) { - include collectd $conf_dir = $collectd::plugin_conf_dir diff --git a/manifests/plugin/oracle/database.pp b/manifests/plugin/oracle/database.pp index 4863cfbb4..c45eb04a0 100644 --- a/manifests/plugin/oracle/database.pp +++ b/manifests/plugin/oracle/database.pp @@ -6,7 +6,6 @@ String $connect_id = $name, String $database = $name, ) { - include collectd include collectd::plugin::oracle diff --git a/manifests/plugin/oracle/query.pp b/manifests/plugin/oracle/query.pp index b88626c7c..011d2558d 100644 --- a/manifests/plugin/oracle/query.pp +++ b/manifests/plugin/oracle/query.pp @@ -4,7 +4,6 @@ Array $results, String $query = $name, ) { - include collectd include collectd::plugin::oracle diff --git a/manifests/plugin/ovs_events.pp b/manifests/plugin/ovs_events.pp index e606dbbb7..60680d34d 100644 --- a/manifests/plugin/ovs_events.pp +++ b/manifests/plugin/ovs_events.pp @@ -53,7 +53,6 @@ Optional[Stdlib::Port] $port = undef, Optional[String] $socket = undef, ) { - include collectd if $manage_package { diff --git a/manifests/plugin/ovs_stats.pp b/manifests/plugin/ovs_stats.pp index 0eec529b9..96d0f7a9a 100644 --- a/manifests/plugin/ovs_stats.pp +++ b/manifests/plugin/ovs_stats.pp @@ -42,7 +42,6 @@ Optional[Stdlib::Port] $port = undef, Optional[String] $socket = undef, ) { - include collectd if $manage_package { diff --git a/manifests/plugin/pcie_errors.pp b/manifests/plugin/pcie_errors.pp index 4f7dc250d..b6afb8e21 100644 --- a/manifests/plugin/pcie_errors.pp +++ b/manifests/plugin/pcie_errors.pp @@ -13,7 +13,6 @@ Boolean $report_masked = false, Boolean $persistent_notifications = false, ) { - include collectd collectd::plugin { 'pcie_errors': diff --git a/manifests/plugin/perl.pp b/manifests/plugin/perl.pp index 2b49d7406..88b4cbf7f 100644 --- a/manifests/plugin/perl.pp +++ b/manifests/plugin/perl.pp @@ -5,7 +5,6 @@ $interval = undef, $order = 20 ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) @@ -35,4 +34,3 @@ group => $collectd::config_group, } } - diff --git a/manifests/plugin/perl/plugin.pp b/manifests/plugin/perl/plugin.pp index 21ea512c4..15233def2 100644 --- a/manifests/plugin/perl/plugin.pp +++ b/manifests/plugin/perl/plugin.pp @@ -10,7 +10,6 @@ String $order = '01', Hash $config = {}, ) { - include collectd if ! defined(Class['Collectd::Plugin::Perl']) { @@ -19,7 +18,7 @@ if $include_dir { if $include_dir =~ String { - $include_dirs = [ $include_dir ] + $include_dirs = [$include_dir] } elsif $include_dir =~ Array { $include_dirs = $include_dir } else { diff --git a/manifests/plugin/ping.pp b/manifests/plugin/ping.pp index d38a77839..3ec5b1d4e 100644 --- a/manifests/plugin/ping.pp +++ b/manifests/plugin/ping.pp @@ -11,7 +11,6 @@ Optional[Integer[-1]] $max_missed = undef, Optional[Integer[0]] $size = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/postgresql.pp b/manifests/plugin/postgresql.pp index 864d4337d..b293b77c8 100644 --- a/manifests/plugin/postgresql.pp +++ b/manifests/plugin/postgresql.pp @@ -2,12 +2,11 @@ class collectd::plugin::postgresql ( $ensure = 'present', $manage_package = undef, - $databases = { }, + $databases = {}, $interval = undef, - $queries = { }, - $writers = { }, + $queries = {}, + $writers = {}, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/postgresql/database.pp b/manifests/plugin/postgresql/database.pp index 73eacac71..4b3cad012 100644 --- a/manifests/plugin/postgresql/database.pp +++ b/manifests/plugin/postgresql/database.pp @@ -15,11 +15,10 @@ $writer = undef, $service = undef, ) { - include collectd include collectd::plugin::postgresql - concat::fragment{ "collectd_plugin_postgresql_conf_db_${title}": + concat::fragment { "collectd_plugin_postgresql_conf_db_${title}": order => '50', target => "${collectd::plugin_conf_dir}/postgresql-config.conf", content => template('collectd/plugin/postgresql/database.conf.erb'), diff --git a/manifests/plugin/postgresql/query.pp b/manifests/plugin/postgresql/query.pp index b05896178..ec35c07ee 100644 --- a/manifests/plugin/postgresql/query.pp +++ b/manifests/plugin/postgresql/query.pp @@ -7,11 +7,10 @@ $minversion = undef, $maxversion = undef, ) { - include collectd include collectd::plugin::postgresql - concat::fragment{ "collectd_plugin_postgresql_conf_query_${title}": + concat::fragment { "collectd_plugin_postgresql_conf_query_${title}": order => '30', target => "${collectd::plugin_conf_dir}/postgresql-config.conf", content => template('collectd/plugin/postgresql/query.conf.erb'), diff --git a/manifests/plugin/postgresql/writer.pp b/manifests/plugin/postgresql/writer.pp index df9c5b2fa..52c7366ef 100644 --- a/manifests/plugin/postgresql/writer.pp +++ b/manifests/plugin/postgresql/writer.pp @@ -4,11 +4,10 @@ String $statement = undef, $storerates = undef, ) { - include collectd include collectd::plugin::postgresql - concat::fragment{ "collectd_plugin_postgresql_conf_writer_${title}": + concat::fragment { "collectd_plugin_postgresql_conf_writer_${title}": order => '40', target => "${collectd::plugin_conf_dir}/postgresql-config.conf", content => template('collectd/plugin/postgresql/writer.conf.erb'), diff --git a/manifests/plugin/powerdns.pp b/manifests/plugin/powerdns.pp index c1629d8a2..7acd2def7 100644 --- a/manifests/plugin/powerdns.pp +++ b/manifests/plugin/powerdns.pp @@ -7,7 +7,6 @@ Optional[Hash[String, Hash]] $recursors = {}, Optional[String] $local_socket = undef, ) { - include collectd $servers_defaults = { 'ensure' => $ensure } diff --git a/manifests/plugin/powerdns/recursor.pp b/manifests/plugin/powerdns/recursor.pp index 85ff06c21..255e0c2f7 100644 --- a/manifests/plugin/powerdns/recursor.pp +++ b/manifests/plugin/powerdns/recursor.pp @@ -3,11 +3,10 @@ Optional[String[1]] $socket = undef, Array[String[1]] $collect = [], ) { - include collectd::plugin::powerdns include collectd - concat::fragment{ "collectd_plugin_powerdns_conf_recursor_${name}": + concat::fragment { "collectd_plugin_powerdns_conf_recursor_${name}": order => '51', content => epp('collectd/plugin/powerdns/recursor.conf.epp', { 'name' => $name, diff --git a/manifests/plugin/powerdns/server.pp b/manifests/plugin/powerdns/server.pp index 79d87da80..c4978f604 100644 --- a/manifests/plugin/powerdns/server.pp +++ b/manifests/plugin/powerdns/server.pp @@ -3,11 +3,10 @@ Optional[String[1]] $socket = undef, Array[String[1]] $collect = [], ) { - include collectd::plugin::powerdns include collectd - concat::fragment{ "collectd_plugin_powerdns_conf_server_${name}": + concat::fragment { "collectd_plugin_powerdns_conf_server_${name}": order => '50', content => epp('collectd/plugin/powerdns/server.conf.epp', { 'name' => $name, diff --git a/manifests/plugin/processes.pp b/manifests/plugin/processes.pp index 33a1d9219..6fa31e32c 100644 --- a/manifests/plugin/processes.pp +++ b/manifests/plugin/processes.pp @@ -9,7 +9,6 @@ Optional[Boolean] $collect_file_descriptor = undef, Optional[Boolean] $collect_memory_maps = undef, ) { - include collectd $processes_defaults = { 'ensure' => $ensure } diff --git a/manifests/plugin/processes/process.pp b/manifests/plugin/processes/process.pp index 2a8ea32de..7ac18be6d 100644 --- a/manifests/plugin/processes/process.pp +++ b/manifests/plugin/processes/process.pp @@ -5,11 +5,10 @@ Optional[Boolean] $collect_file_descriptor = undef, Optional[Boolean] $collect_memory_maps = undef, ) { - include collectd::plugin::processes include collectd - concat::fragment{ "collectd_plugin_processes_conf_process_${process}": + concat::fragment { "collectd_plugin_processes_conf_process_${process}": order => '50', content => epp('collectd/plugin/processes/process.conf.epp', { 'process' => $process, @@ -19,5 +18,4 @@ }), target => "${collectd::plugin_conf_dir}/processes_config.conf", } - } diff --git a/manifests/plugin/processes/processmatch.pp b/manifests/plugin/processes/processmatch.pp index 57c786d16..a2f3abab9 100644 --- a/manifests/plugin/processes/processmatch.pp +++ b/manifests/plugin/processes/processmatch.pp @@ -6,11 +6,10 @@ Optional[Boolean] $collect_file_descriptor = undef, Optional[Boolean] $collect_memory_maps = undef, ) { - include collectd::plugin::processes include collectd - concat::fragment{ "collectd_plugin_processes_conf_processmatch_${matchname}": + concat::fragment { "collectd_plugin_processes_conf_processmatch_${matchname}": order => '51', content => epp('collectd/plugin/processes/processmatch.conf.epp', { 'matchname' => $matchname, diff --git a/manifests/plugin/procevent.pp b/manifests/plugin/procevent.pp index fe4eaf338..0c6e0f829 100644 --- a/manifests/plugin/procevent.pp +++ b/manifests/plugin/procevent.pp @@ -38,7 +38,6 @@ Optional[String[1]] $process_regex = undef, Optional[Integer[1, default]] $buffer_length = undef, ) { - include collectd if $manage_package and $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/protocols.pp b/manifests/plugin/protocols.pp index cd9ecf785..fafa8d9a1 100644 --- a/manifests/plugin/protocols.pp +++ b/manifests/plugin/protocols.pp @@ -4,7 +4,6 @@ Boolean $ignoreselected = false, Array $values = [] ) { - include collectd collectd::plugin { 'protocols': diff --git a/manifests/plugin/python.pp b/manifests/plugin/python.pp index 9019b02ec..bb916665d 100644 --- a/manifests/plugin/python.pp +++ b/manifests/plugin/python.pp @@ -15,7 +15,6 @@ $order = '10', $conf_name = 'python-config.conf', ) { - include collectd $module_dirs = empty($modulepaths) ? { diff --git a/manifests/plugin/python/module.pp b/manifests/plugin/python/module.pp index 8e17b8be3..44408a13f 100644 --- a/manifests/plugin/python/module.pp +++ b/manifests/plugin/python/module.pp @@ -7,7 +7,6 @@ Optional[Stdlib::Absolutepath] $modulepath = undef, Optional[String] $script_source = undef, ) { - include collectd include collectd::plugin::python @@ -48,7 +47,7 @@ ) # Possibly many per instance of a module configuration. - concat::fragment{ "collectd_plugin_python_conf_${title}_config": + concat::fragment { "collectd_plugin_python_conf_${title}_config": order => "50_${module}_50", target => $collectd::plugin::python::python_conf, content => epp('collectd/plugin/python/module.conf_config.epp', diff --git a/manifests/plugin/rabbitmq.pp b/manifests/plugin/rabbitmq.pp index 7e4252872..f763f63cb 100644 --- a/manifests/plugin/rabbitmq.pp +++ b/manifests/plugin/rabbitmq.pp @@ -98,7 +98,7 @@ } if ($_manage_package) and ($provider_proxy) { - $install_options = [{'--proxy' => $provider_proxy}] + $install_options = [{ '--proxy' => $provider_proxy }] } else { $install_options = undef } diff --git a/manifests/plugin/redis.pp b/manifests/plugin/redis.pp index 381250cda..94e1d2ebc 100644 --- a/manifests/plugin/redis.pp +++ b/manifests/plugin/redis.pp @@ -17,7 +17,6 @@ }, }, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/rrdcached.pp b/manifests/plugin/rrdcached.pp index efad6f67a..f973dbb4a 100644 --- a/manifests/plugin/rrdcached.pp +++ b/manifests/plugin/rrdcached.pp @@ -14,7 +14,6 @@ $collectstatistics = undef, $manage_package = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/rrdtool.pp b/manifests/plugin/rrdtool.pp index fb9014e8d..5f45bde06 100644 --- a/manifests/plugin/rrdtool.pp +++ b/manifests/plugin/rrdtool.pp @@ -12,7 +12,6 @@ Optional[Integer] $cachetimeout = 120, Optional[Integer] $writespersecond = 50 ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/sensors.pp b/manifests/plugin/sensors.pp index 9b28ed170..b00a5f0c4 100644 --- a/manifests/plugin/sensors.pp +++ b/manifests/plugin/sensors.pp @@ -8,7 +8,6 @@ $interval = undef, Optional[Array[String]] $package_install_options = undef ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/smart.pp b/manifests/plugin/smart.pp index aa42215a5..b35205620 100644 --- a/manifests/plugin/smart.pp +++ b/manifests/plugin/smart.pp @@ -7,7 +7,6 @@ $manage_package = undef, $package_name = 'collectd-smart', ) { - include collectd if $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/snmp.pp b/manifests/plugin/snmp.pp index 4b5e2493b..f479eeca9 100644 --- a/manifests/plugin/snmp.pp +++ b/manifests/plugin/snmp.pp @@ -6,7 +6,6 @@ Hash[String[1], Collectd::SNMP::Host] $hosts = {}, Optional[Integer[0]] $interval = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/snmp/data.pp b/manifests/plugin/snmp/data.pp index 0f7d07e6b..c940e7558 100644 --- a/manifests/plugin/snmp/data.pp +++ b/manifests/plugin/snmp/data.pp @@ -11,7 +11,6 @@ Optional[Variant[String[1], Array[String[1], 1]]] $ignore = undef, Boolean $invert_match = false, ) { - include collectd include collectd::plugin::snmp diff --git a/manifests/plugin/snmp/host.pp b/manifests/plugin/snmp/host.pp index 576afa775..f5abc4bbb 100644 --- a/manifests/plugin/snmp/host.pp +++ b/manifests/plugin/snmp/host.pp @@ -16,7 +16,6 @@ Optional[Collectd::SNMP::PrivacyProtocol] $privacy_protocol = undef, Optional[String[1]] $privacy_passphrase = undef, ) { - include collectd include collectd::plugin::snmp diff --git a/manifests/plugin/snmp_agent.pp b/manifests/plugin/snmp_agent.pp index 87c7d4caf..74282d75f 100644 --- a/manifests/plugin/snmp_agent.pp +++ b/manifests/plugin/snmp_agent.pp @@ -7,7 +7,7 @@ # @param ensure String Passed to package and collectd::plugin resources (both). Default: present # @param data Optional[Hash[String[1],Collectd::SNMP_AGENT::Data]] Defines scalar field, must be put outside Table block. # @param table Hash[String[1], Collectd::SNMP_AGENT::Table] Defines a table consisting of several Data blocks being its columns -class collectd::plugin::snmp_agent( +class collectd::plugin::snmp_agent ( Enum['present', 'absent'] $ensure = 'present', Optional[Hash[String[1],Collectd::SNMP_AGENT::Data]] $data = { 'memAvailReal' => { @@ -39,7 +39,6 @@ }, } ) { - include collectd collectd::plugin { 'snmp_agent': @@ -50,5 +49,3 @@ }), } } - - diff --git a/manifests/plugin/statsd.pp b/manifests/plugin/statsd.pp index 7abed605c..080ee2100 100644 --- a/manifests/plugin/statsd.pp +++ b/manifests/plugin/statsd.pp @@ -15,7 +15,6 @@ $timersum = undef, $timercount = undef, ) { - include collectd collectd::plugin { 'statsd': diff --git a/manifests/plugin/swap.pp b/manifests/plugin/swap.pp index f9a617374..513c8f635 100644 --- a/manifests/plugin/swap.pp +++ b/manifests/plugin/swap.pp @@ -8,7 +8,6 @@ Boolean $valuespercentage = false, Boolean $reportio = true, ) { - include collectd collectd::plugin { 'swap': diff --git a/manifests/plugin/sysevent.pp b/manifests/plugin/sysevent.pp index 363a29a11..8c3303b4b 100644 --- a/manifests/plugin/sysevent.pp +++ b/manifests/plugin/sysevent.pp @@ -48,7 +48,6 @@ Optional[Integer[0]] $buffer_size = undef, Optional[Integer[1, default]] $buffer_length = undef, ) { - include collectd if $manage_package and $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/syslog.pp b/manifests/plugin/syslog.pp index 45e590604..6f4816a61 100644 --- a/manifests/plugin/syslog.pp +++ b/manifests/plugin/syslog.pp @@ -5,7 +5,6 @@ Enum['debug', 'info', 'notice', 'warning', 'err'] $log_level = 'info', Optional[Enum['OKAY', 'WARNING', 'FAILURE']] $notify_level = undef ) { - include collectd collectd::plugin { 'syslog': diff --git a/manifests/plugin/tail.pp b/manifests/plugin/tail.pp index 70ae77eb8..5bb17f629 100644 --- a/manifests/plugin/tail.pp +++ b/manifests/plugin/tail.pp @@ -4,7 +4,6 @@ $interval = undef, Optional[Hash] $files = {}, ) { - collectd::plugin { 'tail': interval => $interval, } diff --git a/manifests/plugin/tail/file.pp b/manifests/plugin/tail/file.pp index 5bebc6b3e..4b78f1342 100644 --- a/manifests/plugin/tail/file.pp +++ b/manifests/plugin/tail/file.pp @@ -5,7 +5,6 @@ Array[Hash] $matches, $ensure = 'present', ) { - include collectd include collectd::plugin::tail diff --git a/manifests/plugin/target_v5upgrade.pp b/manifests/plugin/target_v5upgrade.pp index f468c230a..f11138bb4 100644 --- a/manifests/plugin/target_v5upgrade.pp +++ b/manifests/plugin/target_v5upgrade.pp @@ -2,7 +2,6 @@ class collectd::plugin::target_v5upgrade ( $ensure = 'present', ) { - include collectd collectd::plugin { 'target_v5upgrade': diff --git a/manifests/plugin/tcpconns.pp b/manifests/plugin/tcpconns.pp index 653cd9662..198e49d8a 100644 --- a/manifests/plugin/tcpconns.pp +++ b/manifests/plugin/tcpconns.pp @@ -7,7 +7,6 @@ Optional[Boolean] $allportssummary = undef, $ensure = 'present' ) { - include collectd collectd::plugin { 'tcpconns': diff --git a/manifests/plugin/thermal.pp b/manifests/plugin/thermal.pp index aa60fc1dd..560db6062 100644 --- a/manifests/plugin/thermal.pp +++ b/manifests/plugin/thermal.pp @@ -5,7 +5,6 @@ Boolean $ignoreselected = false, $interval = undef, ) { - include collectd collectd::plugin { 'thermal': diff --git a/manifests/plugin/threshold.pp b/manifests/plugin/threshold.pp index 46714854f..f32dddfbc 100644 --- a/manifests/plugin/threshold.pp +++ b/manifests/plugin/threshold.pp @@ -6,7 +6,6 @@ Array[Collectd::Threshold::Plugin] $plugins = [], Array[Collectd::Threshold::Host] $hosts = [], ) { - include collectd collectd::plugin { 'threshold': diff --git a/manifests/plugin/unixsock.pp b/manifests/plugin/unixsock.pp index 8caf8232c..7da00fc3d 100644 --- a/manifests/plugin/unixsock.pp +++ b/manifests/plugin/unixsock.pp @@ -7,7 +7,6 @@ $ensure = 'present', $interval = undef, ) { - include collectd collectd::plugin { 'unixsock': diff --git a/manifests/plugin/uptime.pp b/manifests/plugin/uptime.pp index 6fb5a5df9..26b24f604 100644 --- a/manifests/plugin/uptime.pp +++ b/manifests/plugin/uptime.pp @@ -3,7 +3,6 @@ $ensure = 'present', $interval = undef, ) { - include collectd collectd::plugin { 'uptime': diff --git a/manifests/plugin/users.pp b/manifests/plugin/users.pp index ddadc7edc..ddc5f14e0 100644 --- a/manifests/plugin/users.pp +++ b/manifests/plugin/users.pp @@ -3,7 +3,6 @@ $ensure = 'present', $interval = undef, ) { - include collectd collectd::plugin { 'users': diff --git a/manifests/plugin/uuid.pp b/manifests/plugin/uuid.pp index 5613a1902..139a3b687 100644 --- a/manifests/plugin/uuid.pp +++ b/manifests/plugin/uuid.pp @@ -4,7 +4,6 @@ $ensure = 'present', $interval = undef, ) { - include collectd collectd::plugin { 'uuid': diff --git a/manifests/plugin/varnish.pp b/manifests/plugin/varnish.pp index 456c10da8..85783a913 100644 --- a/manifests/plugin/varnish.pp +++ b/manifests/plugin/varnish.pp @@ -8,7 +8,6 @@ }, $interval = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/virt.pp b/manifests/plugin/virt.pp index 1ed69d330..0ff75f831 100644 --- a/manifests/plugin/virt.pp +++ b/manifests/plugin/virt.pp @@ -6,14 +6,13 @@ Optional[Pattern[/^\d+$/]] $refresh_interval = undef, Optional[String] $domain = undef, Optional[String] $block_device = undef, - Optional[String]$interface_device = undef, + Optional[String] $interface_device = undef, Optional[Boolean] $ignore_selected = undef, Optional[String] $hostname_format = undef, Optional[String] $interface_format = undef, Optional[String] $extra_stats = undef, $interval = undef, ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/vmem.pp b/manifests/plugin/vmem.pp index 1a6582eba..89637b9eb 100644 --- a/manifests/plugin/vmem.pp +++ b/manifests/plugin/vmem.pp @@ -4,7 +4,6 @@ $interval = undef, $verbose = false, ) { - include collectd collectd::plugin { 'vmem': diff --git a/manifests/plugin/write_graphite.pp b/manifests/plugin/write_graphite.pp index 718b74317..5781cb949 100644 --- a/manifests/plugin/write_graphite.pp +++ b/manifests/plugin/write_graphite.pp @@ -5,7 +5,6 @@ $ensure = 'present', $globals = false, ) { - include collectd collectd::plugin { 'write_graphite': diff --git a/manifests/plugin/write_graphite/carbon.pp b/manifests/plugin/write_graphite/carbon.pp index ff465e237..9559eae1c 100644 --- a/manifests/plugin/write_graphite/carbon.pp +++ b/manifests/plugin/write_graphite/carbon.pp @@ -14,7 +14,6 @@ Boolean $logsenderrors = true, Integer $reconnectinterval = 0, ) { - include collectd include collectd::plugin::write_graphite diff --git a/manifests/plugin/write_http.pp b/manifests/plugin/write_http.pp index 2057cfd73..3b993b512 100644 --- a/manifests/plugin/write_http.pp +++ b/manifests/plugin/write_http.pp @@ -10,7 +10,6 @@ Hash[String, Hash[String, Scalar]] $urls = {}, Optional[Boolean] $manage_package = undef, ) { - include collectd if !empty($nodes) and !empty($urls) { @@ -27,7 +26,7 @@ } } if $_manage_package { - package{'collectd-write_http': + package { 'collectd-write_http': ensure => $ensure, } } diff --git a/manifests/plugin/write_kafka.pp b/manifests/plugin/write_kafka.pp index d33ffc3db..b9c7171dc 100644 --- a/manifests/plugin/write_kafka.pp +++ b/manifests/plugin/write_kafka.pp @@ -7,11 +7,10 @@ Hash $properties = {}, Hash $meta = {}, ) { - include collectd if($kafka_host and $kafka_port) { - $real_kafka_hosts = [ "${kafka_host}:${kafka_port}" ] + $real_kafka_hosts = ["${kafka_host}:${kafka_port}"] } else { $real_kafka_hosts = $kafka_hosts } diff --git a/manifests/plugin/write_log.pp b/manifests/plugin/write_log.pp index d088625f7..63de6e3f5 100644 --- a/manifests/plugin/write_log.pp +++ b/manifests/plugin/write_log.pp @@ -2,7 +2,6 @@ String $format = 'JSON', $ensure = 'present', ) { - include collectd collectd::plugin { 'write_log': diff --git a/manifests/plugin/write_network.pp b/manifests/plugin/write_network.pp index e0b3aec15..a74c77f76 100644 --- a/manifests/plugin/write_network.pp +++ b/manifests/plugin/write_network.pp @@ -1,9 +1,8 @@ # A define to make a generic network output for collectd class collectd::plugin::write_network ( $ensure = 'present', - Hash $servers = { 'localhost' => { 'serverport' => '25826' } }, + Hash $servers = { 'localhost' => { 'serverport' => '25826' } }, ) { - include collectd $servernames = keys($servers) diff --git a/manifests/plugin/write_prometheus.pp b/manifests/plugin/write_prometheus.pp index 18eac1991..07f9afcf7 100644 --- a/manifests/plugin/write_prometheus.pp +++ b/manifests/plugin/write_prometheus.pp @@ -2,7 +2,6 @@ Stdlib::Port $port = 9103, $ensure = 'present', ) { - include collectd collectd::plugin { 'write_prometheus': diff --git a/manifests/plugin/write_riemann.pp b/manifests/plugin/write_riemann.pp index db6990a14..6fb2a4197 100644 --- a/manifests/plugin/write_riemann.pp +++ b/manifests/plugin/write_riemann.pp @@ -6,7 +6,6 @@ Array[String[1]] $tags = [], Hash[String[1],String[1]] $attributes = {}, ) { - include collectd if $facts['os']['family'] == 'RedHat' { diff --git a/manifests/plugin/write_sensu.pp b/manifests/plugin/write_sensu.pp index bf6cbdb85..ba0bd7d25 100644 --- a/manifests/plugin/write_sensu.pp +++ b/manifests/plugin/write_sensu.pp @@ -11,7 +11,6 @@ $notifications = false, $notifs_handler = 'example_notification_handler', ) { - include collectd $_manage_package = pick($manage_package, $collectd::manage_package) diff --git a/manifests/plugin/write_tsdb.pp b/manifests/plugin/write_tsdb.pp index e02ddeec0..faef1d457 100644 --- a/manifests/plugin/write_tsdb.pp +++ b/manifests/plugin/write_tsdb.pp @@ -8,10 +8,9 @@ Boolean $store_rates = false, Boolean $always_append_ds = false, ) { - include collectd - collectd::plugin {'write_tsdb': + collectd::plugin { 'write_tsdb': ensure => $collectd::plugin::write_tsdb::ensure, content => template('collectd/plugin/write_tsdb.conf.erb'), } diff --git a/manifests/plugin/zfs_arc.pp b/manifests/plugin/zfs_arc.pp index 5a513c7f2..b98a9cd93 100644 --- a/manifests/plugin/zfs_arc.pp +++ b/manifests/plugin/zfs_arc.pp @@ -2,7 +2,6 @@ class collectd::plugin::zfs_arc ( $ensure = 'present', ) { - include collectd collectd::plugin { 'zfs_arc': diff --git a/manifests/plugin/zookeeper.pp b/manifests/plugin/zookeeper.pp index 8c6054bab..8c2293811 100644 --- a/manifests/plugin/zookeeper.pp +++ b/manifests/plugin/zookeeper.pp @@ -4,7 +4,6 @@ Stdlib::Host $zookeeper_host = 'localhost', Stdlib::Port $zookeeper_port = 2181, ) { - include collectd collectd::plugin { 'zookeeper': diff --git a/manifests/repo.pp b/manifests/repo.pp index cea0e47eb..4d750d5e0 100644 --- a/manifests/repo.pp +++ b/manifests/repo.pp @@ -1,16 +1,13 @@ # collectd::repo # Handle package repo configuration class collectd::repo { - if $collectd::manage_repo { $osfamily_downcase = downcase($facts['os']['family']) if defined("::collectd::repo::${osfamily_downcase}") { require "::collectd::repo::${osfamily_downcase}" } else { - notify{"You have asked to manage_repo on a system that doesn't have a repo class specified: ${facts['os']['family']}":} + notify { "You have asked to manage_repo on a system that doesn't have a repo class specified: ${facts['os']['family']}": } } } - } - diff --git a/manifests/repo/debian.pp b/manifests/repo/debian.pp index e0d1b698a..671dfe9a9 100644 --- a/manifests/repo/debian.pp +++ b/manifests/repo/debian.pp @@ -1,12 +1,10 @@ class collectd::repo::debian { - contain apt if $collectd::manage_package { Class['apt::update'] -> Package[$collectd::package_name] } if $collectd::ci_package_repo { - apt::source { 'collectd-ci': location => 'https://pkg.ci.collectd.org/deb/', repos => "collectd-${$collectd::ci_package_repo}", @@ -30,5 +28,4 @@ } } } - } diff --git a/manifests/repo/redhat.pp b/manifests/repo/redhat.pp index 0afa6253e..d2b5a5630 100644 --- a/manifests/repo/redhat.pp +++ b/manifests/repo/redhat.pp @@ -1,16 +1,12 @@ class collectd::repo::redhat { - if $collectd::ci_package_repo { - yumrepo { 'collectd-ci': ensure => present, enabled => '1', baseurl => "https://pkg.ci.collectd.org/rpm/collectd-${collectd::ci_package_repo}/epel-${facts['os']['release']['major']}-${facts['os']['architecture']}", gpgkey => 'https://pkg.ci.collectd.org/pubkey.asc', } - } else { require epel } - } diff --git a/manifests/service.pp b/manifests/service.pp index bc9d31618..a909ef30a 100644 --- a/manifests/service.pp +++ b/manifests/service.pp @@ -1,6 +1,5 @@ # class collectd::service { - assert_private() if $collectd::manage_service { @@ -10,5 +9,4 @@ enable => $collectd::service_enable, } } - } diff --git a/manifests/typesdb.pp b/manifests/typesdb.pp index 3739653f3..e36954a9e 100644 --- a/manifests/typesdb.pp +++ b/manifests/typesdb.pp @@ -4,7 +4,6 @@ $mode = $collectd::config_mode, $owner = $collectd::config_owner, ) { - include collectd concat { $path: