It's not quite that simple. The provider
serves as the backend for a type
. To enable Puppet to use an additional parameter to the package
type, you will have to add it to the respective type code such as the source
param in the upstream code.
Once you patch that in, @resource[:path]
should indeed work inside the provider instances.
Of course, such additions are not suitable for a module, so you would techically need to actually add a new type of your own (and sadly, there is no subtyping yet).
It may be worth checking wether install_options can perhaps solve your problem using the existing provider.