I like hold and purge as separate parameters for readability (which
translates to being easier to parse with external scripts if necessary).

Trevor


On Tue, Apr 1, 2014 at 9:09 AM, Daniele Sluijters <
[email protected]> wrote:

> If we go down this road, how does 'purged' fit in. Should we have purge =>
> true, or ensure => 'purged'?
>
>
> On Wednesday, 26 March 2014 19:12:33 UTC+1, Jesse Hathaway wrote:
>
>> In my discussion with @adrienthebo on my pull request:
>> https://github.com/puppetlabs/puppet/pull/2309 I raised the question of
>> what should be the allowable or suggested values for the ensure property?
>>
>> My pull request separated out the hold state into a separate property:
>>
>> before:
>>
>> package { 'foo':
>>   ensure => held
>> }
>>
>>
>> after:
>>
>> package { 'foo':
>>   ensure => '0.4',
>>   hold => false
>> }
>>
>>
>> @adrienthebo suggested I separate out the version instead:
>>
>> package { 'foo':
>>   ensure => held,
>>   version => '0.4',
>> }
>>
>>
>> @adrienthebo's suggestion is certianly doable, my question is whether the
>> puppet community has come to a consensus on what values the ensure property
>> should have?
>>
>> In general my experience has been that adding additional values to ensure
>> for resources makes using a resource less intuitive. For instance I find
>> the file resource has a confusing interface because of the way it abuses
>> the ensure property:
>>
>> file {'/foo':
>>   ensure => file,
>> }
>>
>> file {'/foo':
>>   ensure => directory,
>> }
>>
>>
>> I would rather have explicit resources:
>>
>> directory {'/foo':
>>   ensure => present
>> }
>>
>>
>> What are the communities thoughts?
>>
>> -Jesse Hathaway
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-dev/8af42114-8ec1-4d85-9000-096031d98e9a%40googlegroups.com<https://groups.google.com/d/msgid/puppet-dev/8af42114-8ec1-4d85-9000-096031d98e9a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
[email protected]

-- This account not approved for unencrypted proprietary information --

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CANs%2BFoXRc2VkaL%2BysqTPuKZ5FoGTQ%2Bnt6nRgNz7%3DDd%3DjTiJsiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to