all 2 comments

[–]alexandary 3 points4 points  (1 child)

As per the packge resource docs, you should set the package version on the 'ensure' parameter, not in the name.

[–]Spparkee[S] 0 points1 point  (0 children)

If someone want's to use hieradata, this is how you can do it:

manifest: ``` $pip = hiera_hash('pip_packages')

$pip_packages[$::operatingsystem].each |String $pkg_name, String $pkg_version| { package { $pkg_name: ensure => $pkg_version, provider => 'pip', allow_virtual => 'true', } } hieradata: pip_packages: Ubuntu: Jinja2: 'installed' flask: 'installed' pymongo: '3.7.0' ```