voxpupuli / puppet-vmwaretools

Puppet module to manage VMware Operating System Specific Packages for VMware tools installation.
http://forge.puppetlabs.com/razorsedge/vmwaretools
Apache License 2.0
34 stars 44 forks source link

File_line[disable-tools-version]: Could not evaluate: can't convert Hash into String #61

Open akomakom opened 7 years ago

akomakom commented 7 years ago

I recently upgraded my stdlib module to puppetlabs-stdlib (v4.16.0) from (v4.6.0). As a consequence, vmwaretools no longer works. I reverted back to 4.6.0 and there is no error.

My guess is that Package[$package_real] seems to be the issue, since that's the only relevant Hash. Note that in the output, Puppet may be choosing not to add the Package to the catalog.

Usage:

class{ "vmwaretools": ensure => 'absent' }

Error:

Debug: Executing '/bin/rpm -q vmware-tools-esx-nox --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: /Stage[main]/Vmwaretools/Package[vmware-tools-esx-nox]: Nothing to manage: no ensure and the resource doesn't exist
Debug: Executing '/bin/rpm -q vmware-tools-esx-kmods --nosignature --nodigest --qf %{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n'
Debug: /Stage[main]/Vmwaretools/Package[vmware-tools-esx-kmods]: Nothing to manage: no ensure and the resource doesn't exist
Error: /Stage[main]/Vmwaretools/File_line[disable-tools-version]: Could not evaluate: can't convert Hash into String
Notice: /Stage[main]/Vmwaretools/Service[vmware-tools-services]: Dependency File_line[disable-tools-version] has failures: true
Warning: /Stage[main]/Vmwaretools/Service[vmware-tools-services]: Skipping because of failed dependencies
Debug: Class[Vmwaretools]: The container Stage[main] will propagate my refresh event

I attempted to verify that ensure is set to a value for the Package[$package_real] resource by adding this to init.pp:

notify{"Package ensure is ${package_ensure}":}

And the printout confirms that the value is "absent" and not undef.

razorsedge commented 7 years ago

@akomakom Are you running under ruby 1.8.7? If so, have you tried using puppetlabs-stdlib 4.17.0?