Issue #4113 has been updated by Daniel Pittman.
Jacob Helwig wrote:
> We ended up figuring out the basic shape of what this would look like in the
> puppet language side in doing the work on the MSI package provider.
>
> It will end up looking like:
>
> { "foo": ensure => installed, options => { 'enablerepo' => ['one', 'two']
> } }
>
> Re-targeting for Telly, since this was originally targeted at 2.7.x before it
> had shipped.
As a short-term work around this seems acceptable to me, but I am (now)
concerned that I didn't see enough of the picture before. While structured
data for the options is valuable, it won't work well with compliance auditing
in the longer term, and is essentially an opaque data structure for things like
structured editing, or pre-flight validation.
We would be much better off trying to avoid using this for anything but
targetted features (eg: `msioptions` rather than `options`), and working out
how to have provider-specific properties and parameters as *first class* parts
of the language.
I mean something that has the property that a third party can write a provider
that extends the set of properties and parameters without any prior arrangement
with Puppet Labs, and without having to touch the type at all.
This would allow all the benefits of real types: autorequires, search and
storage, validation, munging, documentation, etc.
The simplest version would, to support validation, be to add those when the
provider is explicit:
<pre>
# This will fail with `provider_specific_value` being unknown:
example_type { "blah": provider_specific_value => 12 }
# This will succeed, because we were explicit:
example_type { "blah": provider => 'quux', provider_specific_value => 12 }
</pre>
The alternative, to treat `options` as a hash that behaves, more or less, like
the top level keys do, seems like it has just as many problems, but is a bit
less coherent at the language level.
In other words, I recant my final option in comment 8. :)
----------------------------------------
Feature #4113: Provide a generic "options"-style parameter for packages.
https://projects.puppetlabs.com/issues/4113
Author: Oliver Hookins
Status: Accepted
Priority: Normal
Assignee: Jacob Helwig
Category:
Target version: Telly
Affected Puppet version: 0.25.5
Keywords:
Branch:
http://groups.google.com/group/puppet-users/browse_thread/thread/2ef615fc42225d99?pli=1
Our requirement is more or less the same as in the linked thread, we need to
use a proxy to install gems but for a variety of reasons can't set a global
proxy on the machines. Thus some way of passing options to gem is necessary.
(Nigel) - We should do this consistently across providers, perhaps combining
with the "preseed" functionality of apt/dpkg.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.