Closed drt24 closed 11 years ago
Hiya! Thanks for the contrib!
I'm a pretty heavy puppet user and I'm wondering if you can point me to the puppet3 docs or an example of the error message so I can change my style accordingly? I was under the impression that the "method call / local variable" style was still legit and I generally liked it better because typos yield explicit "not found" errors instead of just happily returning nil
.
Without these changes we get the following warnings when running puppet:
Warning: Variable access via 'comment' is deprecated. Use '@comment' instead. template[/etc/puppet/modules/sudoers/templates/allowed-command.erb]:2
(at /etc/puppet/modules/sudoers/templates/allowed-command.erb:2:in `result')
Warning: Variable access via 'allowed_env_variables' is deprecated. Use '@allowed_env_variables' instead. template[/etc/puppet/modules/sudoers/templates/allowed-command.erb]:4
(at /etc/puppet/modules/sudoers/templates/allowed-command.erb:4:in `result')
Warning: Variable access via 'user_spec' is deprecated. Use '@user_spec' instead. template[/etc/puppet/modules/sudoers/templates/allowed-command.erb]:7
(at /etc/puppet/modules/sudoers/templates/allowed-command.erb:7:in `result')
This is documented http://docs.puppetlabs.com/guides/templating.html#referencing-variables
Aha thank you - I spend a few minutes poking around on the docs but I couldn't find that. :+1:
Update templates/allowed-command.erb to support Puppet3 without warnings about deprecated variable usage.