Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix strict variables error when facts are missing #708

Merged
merged 1 commit into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
$write_threads = $collectd::params::write_threads,
) inherits collectd::params {

$collectd_version_real = pick($::collectd_version, $minimum_version)
$collectd_version_real = pick_default($facts['collectd_version'], $minimum_version)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if minimum_version is allowed to be set to undef, but pick_default would allow this.


class { '::collectd::install':
package_install_options => $package_install_options,
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,5 @@
}

# Override with custom fact value (present only if python is installed)
$python_dir = pick($::python_dir, $default_python_dir)
$python_dir = pick($facts['python_dir'], $default_python_dir)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default_python_dir is always set, so pick_default isn't needed/wanted here.

}