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

Get rid of the warning #54

Closed rgarrigue closed 7 years ago

rgarrigue commented 7 years ago

Hi

Is there a clean way to get rid of those warning ?

[root@ppbgows01 ~]# puppet apply --environment preproduction /etc/puppetlabs/code/environments/preproduction/manifests/
Warning: Unknown variable: '::vmwaretools_reposerver'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:21:17
Warning: Unknown variable: '::vmwaretools_repopath'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:26:15
Warning: Unknown variable: '::vmwaretools_repopriority'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:31:19
Warning: Unknown variable: '::vmwaretools_repoprotect'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:36:18
Warning: Unknown variable: '::vmwaretools_gpgkey_url'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:41:17
Warning: Unknown variable: '::vmwaretools_proxy'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:46:12
Warning: Unknown variable: '::vmwaretools_proxy_username'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:51:21
Warning: Unknown variable: '::vmwaretools_proxy_password'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:56:21
Warning: Unknown variable: '::vmwaretools_tools_version'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:61:20
Warning: Unknown variable: '::vmwaretools_ensure'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:68:13
Warning: Unknown variable: '::vmwaretools_package'. at /etc/puppetlabs/code/environments/preproduction/modules/vmwaretools/manifests/params.pp:73:14

Regards,

alexjfisher commented 7 years ago

@rgarrigue See https://github.com/razorsedge/puppet-vmwaretools/issues/55

rgarrigue commented 7 years ago

@alexjfisher Ok. Should I enforce STRICT_VARIABLES=no ? If I should, how do I do that, site.pp, puppet.conf ?

Thanks,

alexjfisher commented 7 years ago

It'd be strict_variables = false in puppet.conf on your master https://docs.puppet.com/puppet/latest/reference/configuration.html#strictvariables

STRICT_VARIABLES=no is how you'd set the option when using rspec-puppet and puppetlabs_spec_helper. https://github.com/puppetlabs/puppetlabs_spec_helper#initializing-puppet-for-testing

I don't think this will help you though. The option already defaults to false but I'm guessing in recent versions, puppet generates warnings. If it was set to true I don't think the catalog would compile at all.

To fix the warnings, you'd have to fix the params.pp manifest in this module. The fixes aren't hard, but there are quite a lot of them needed. I might be able to find the time at some point, just probably not this week at least.

rgarrigue commented 7 years ago

So I tried the strict_variable=no, but as you guessed that's not changing anything. Settings it to yes issue an error instead of a warning and stop compilation, no is the default issue warning type.

So... well, that only cosmetic, nevermind this. Thanks for the answer anyway !

2016-08-31 14:07 GMT+02:00 Alex Fisher notifications@github.com:

It'd be strict_variables = false in puppet.conf on your master https://docs.puppet.com/puppet/latest/reference/configuration.html# strictvariables

STRICT_VARIABLES=no is how you'd set the option when using rspec-puppet and puppetlabs_spec_helper. https://github.com/puppetlabs/ puppetlabs_spec_helper#initializing-puppet-for-testing

I don't think this will help you though. The option already defaults to false but I'm guessing in recent versions, puppet generates warnings. If it was set to true I don't think the catalog would compile at all.

To fix the warnings, you'd have to fix the params.pp manifest in this module. The fixes aren't hard, but there are quite a lot of them needed. I might be able to find the time at some point, just probably not this week at least.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/razorsedge/puppet-vmwaretools/issues/54#issuecomment-243743938, or mute the thread https://github.com/notifications/unsubscribe-auth/AByQn3CqUpTvo735MvTak0g5gfpRb54Rks5qlW5mgaJpZM4JtOC- .

razorsedge commented 7 years ago

Fixed in #62 and released to the Forge as 6.1.0.