Issue #4113 has been updated by Daniel Pittman.

> I’m not at all convinced that the plethora of possible features that people
> would use a generic ‘options’ field with make sense to spend time modeling.
[…]
> Why not offer a general options field? Then as people start to use it, we’ll
> end up identifying more things that can be actually modelled.

I am not sure what you are actually suggesting here.  However, to be clear:

If we provide a generic field like "options", and that contains
anything more than boolean values, or *maybe* a hash that contains
rich data structures (eg: string, array, hash), we have lost.  That
would be terrible.  We should absolutely model provider-specific
features in the Puppet language, not in some arbitrary DSL embedded in
strings.

Concretely, this is good:

 <pre>package { "foo": ensure => installed, enablerepo => ['one', 'two'] }</pre>

This is not good:

<pre>package { "foo": ensure => installed, options =>
"enablerepo=one,two" }</pre>

The difference is that the second is impossible to understand without
specialized prior knowledge of the significance of every possible
option, and what is valid or invalid.  It creates a tiny language for
"package provider options for the yum provider" that has no more
features than the Puppet DSL.

This is also good, IMO:

<pre>package { "foo": ensure => installed, options => { 'enablerepo'
=> ['one', 'two'] } }<pre>
----------------------------------------
Feature #4113: Provide a generic "options"-style parameter for packages.
https://projects.puppetlabs.com/issues/4113

Author: Oliver Hookins
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 2.7.x
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.

Reply via email to