I very much like the idea of having a separate variable such as
'user_range' as proposed by David.

This would allow for a single declaration instead of having to repeat
things for each user that's created.

There should probably be multiple options though:

user_modifier { 'min_id': value => '1001' }
user_modifier { 'max_id': value => '4000' }
user_modifier { 'ignore': range => [ '2000...3000','10000...40000'] }

It would also be nice to make the 'ignore' segment appendable so that
different hosts could add to the ignore list if necessary.

The syntax above is just to illustrate my point and not necessariliy a
good idea.

+1 for this feature request though.

Thanks,

Trevor

On Wed, May 16, 2012 at 2:51 AM, David Schmitt <[email protected]> wrote:
> On 2012-05-15 18:56, Jeff Weiss wrote:
>>
>> Puppet Community,
>>
>> We need your help.
>>
>> We have a terrific contribution from Bart ten Brinke that would add an
>> `unless_uid` parameter to user resources.  The pull is request is 628
>> (https://github.com/puppetlabs/puppet/pull/628).
>>
>> We acknowledge the clear use case around needing to exclude specific
>> users--not explicitly managed by Puppet--from a purge.  Because we don't
>> yet have an awesome resource collection syntax for this and we feel that
>> would be a decent-sized investment, we're on the fence about the syntax
>> that this would create.  Here's the example from the pull request:
>>
>> |class users::resources {
>>   resources {'user':
>>   purge              =>  true,
>>   unless_system_user =>  true,
>>   unless_uid =>  [10_000..20_000];
>>   }
>> }|
>>
>>
>> To reiterate, we see value here and can't think of a better near-term
>> solution.
>>
>> What are your thoughts? Is this intuitive enough? Is it a must-have
>> feature?
>
>
> Interesting concept. I find the syntax acceptable.
>
> Alternatively a file-inspired syntax comes to mind:
>
>    file { "/somewhere": source => "...", purge => true }
>
>    user_range { "[10000..15000]": purge => false }
>
> I'm not convinced that would be better.
>
> A more concrete point would be to add more examples into the docstring. As
> it stands there is no chance to create a correct range expression from the
> documentation alone.
>
>
> Related point: I'd really like to avoid *creating* users in a specified
> range. At a site I've got NIS users and puppet happily creates local admin
> users in that range creating clashes in the future. Any ideas?
>
>
> Best Regards, David
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" 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-dev?hl=en.
>



-- 
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 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-dev?hl=en.

Reply via email to