Skip to content

Commit

Permalink
Merge d41a46f into 3daaf69
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Jul 24, 2020
2 parents 3daaf69 + d41a46f commit 05ea6d3
Show file tree
Hide file tree
Showing 161 changed files with 177 additions and 336 deletions.
3 changes: 3 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Vox Pupuli Security Policy

Our vulnerabilities reporting process is at https://voxpupuli.org/security/
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,9 @@ RSpec/RepeatedDescription:
RSpec/NestedGroups:
Enabled: False

RSpec/MultipleExpectations:
Enabled: false

# this is broken on ruby1.9
Layout/IndentHeredoc:
Enabled: False
Expand Down
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
os: linux
dist: bionic
language: ruby
cache: bundler
Expand All @@ -7,7 +8,7 @@ before_install:
- bundle --version
script:
- 'bundle exec rake $CHECK'
matrix:
jobs:
fast_finish: true
include:
- rvm: 2.4.4
Expand Down Expand Up @@ -92,7 +93,7 @@ notifications:
- "chat.freenode.org#voxpupuli-notifications"
deploy:
provider: puppetforge
user: puppet
username: puppet
password:
secure: "FAK3Izs5bSZyblGvcFnGWm0exZV5+v9pbwfRDD2oihWxX3U3pArGW+3XcwcJfLQgrUYBsOTmHC8yPjlgTBYeIt/5pvg9X+3jwNgeto6kozpI/nvAq4NtcHhzxRejuPELhFYeXZ3hEw0w+v/ZRo2cNLwI0LLpiWEDvCMZN1CJ2RY="
on:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil)
end

group :test do
gem 'voxpupuli-test', '>= 1.0.0', :require => false
gem 'voxpupuli-test', '>= 2.0.0', :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
10 changes: 5 additions & 5 deletions examples/plugins/memcached.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
include collectd

class { 'collectd::plugin::memcached':
instances => {
'default' => {
'host' => 'localhost',
'address' => '127.0.0.1',
'port' => '11211',
instances => {
'default' => {
'host' => 'localhost',
'address' => '127.0.0.1',
'port' => '11211',
},
},
}
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
6 changes: 3 additions & 3 deletions examples/plugins/processes.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
include collectd

class { 'collectd::plugin::processes':
processes => [ 'process1', 'process2' ],
processes => ['process1', 'process2'],
process_matches => [
{ name => 'process-all',
regex => 'process[0-9]' },
{ name => 'process-all',
regex => 'process[0-9]' },
],
}
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': }

2 changes: 0 additions & 2 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# private
class collectd::config inherits 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
7 changes: 2 additions & 5 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 @@ -12,11 +11,9 @@
}
}

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

}
5 changes: 2 additions & 3 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 @@ -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"
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
1 change: 0 additions & 1 deletion manifests/plugin/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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' {
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
Loading

0 comments on commit 05ea6d3

Please sign in to comment.