voxpupuli / puppet-collectd

Collectd module for Puppet
https://forge.puppet.com/puppet/collectd
Apache License 2.0
69 stars 272 forks source link

Unknown variable collectd_version #700

Open fnoop opened 7 years ago

fnoop commented 7 years ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

class { "collectd": config_file => $config_file, plugin_conf_dir => $plugin_conf_dir, plugin_conf_dir_mode => "755", purge => true, recurse => true, purge_config => true, minimum_version => '5.7', manage_package => $manage_package, manage_repo => $manage_repo, manage_service => true, service_name => 'maverick-collectd', typesdb => [$typesdb], }

What are you seeing

Error: Evaluation Error: Unknown variable: '::collectd_version'. at /srv/maverick/software/maverick/manifests/puppet-modules/collectd/manifests/init.pp:37:33 on node maverick-ubuntu17

Any additional information you'd like to impart

puppet is being run as a local standalone process (puppet apply), not as client/server. Worked fine with version 5.3.0 of this module

crigertg commented 7 years ago

The problem occurs when strict_variables are enabled in the puppetmaster configuration: https://puppet.com/docs/puppet/5.2/configuration.html#strictvariables

When the fact is empty when collectd is not installed (that's the case on the first puppet run with this module) it fails.

btravouillon commented 7 years ago

Hi @fnoop ,

PR #708 merged yesterday. Can you give a try in your environment?