Skip to content

Commit

Permalink
collectd::plugin::apache - Use data types
Browse files Browse the repository at this point in the history
- $manage_package must now be a Boolean and defaults to the value of
  $collectd::manage_package
  • Loading branch information
juniorsysadmin committed Apr 8, 2018
1 parent f6c7d6a commit 69765e6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions manifests/plugin/apache.pp
@@ -1,18 +1,16 @@
# https://collectd.org/wiki/index.php/Plugin:Apache
class collectd::plugin::apache (
$ensure = 'present',
$manage_package = undef,
Enum['present', 'absent'] $ensure = 'present',
Boolean $manage_package = $collectd::manage_package,
Hash $instances = { 'localhost' => { 'url' => 'http://localhost/mod_status?auto' } },
$interval = undef,
Optional[Integer[1]] $interval = undef,
Optional[Array] $package_install_options = $collectd::package_install_options,
) {

include ::collectd

$_manage_package = pick($manage_package, $::collectd::manage_package)

if $facts['os']['family'] == 'RedHat' {
if $_manage_package {
if $manage_package {
package { 'collectd-apache':
ensure => $ensure,
install_options => $package_install_options,
Expand Down

0 comments on commit 69765e6

Please sign in to comment.