puppetlabs-splunk bug?

asked 2016-01-07 11:21:48 -0500

maynero gravatar image

updated 2016-01-07 11:58:33 -0500

I'm trying to install splunk forwarder using the official puppetlabs-splunk module. I have below class to use this module:

class splunksetup {
    class { 'splunk::params':
        version => '6.3.2',
        build => 'aaff59bb082c',
        src_root => 'puppet:///modules/splunk',
    } ->
    class { 'splunk::forwarder': 
        server => 'myserver.local',
        pkg_provider => 'windows'

but I got this error when running this on the agent machine

Error: Don't know how to install 'C:\ProgramData\staging\\splunk\\undef'

Since there is "undef" being printed their, I assume that there is some variable not initialize or whatsoever, I check the forwarder.pp in GitHub and I got this

if $pkg_provider != undef and $pkg_provider != 'yum' and  $pkg_provider != 'apt' {
    include staging
    $pkg_path_parts  = [$staging::path, $staging_subdir, $staged_package]
    $pkg_source      = join($pkg_path_parts, $path_delimiter)

    #no need for staging the source if we have yum or apt
    $staged_package  = staging_parse($package_source)
    staging::file { $staged_package:
      source => $package_source,
      subdir => $staging_subdir,
      before => Package[$package_name],

Isn't it

$staged_package  = staging_parse($package_source)

should happen before?

$pkg_path_parts  = [$staging::path, $staging_subdir, $staged_package]
edit retag flag offensive close merge delete