Udo,

By default, users are added to the groups specified by the "groups"
parameter in *addition* to any groups they may already be a part of.
See the "membership" parameter under
http://reductivelabs.com/trac/puppet/wiki/TypeReference#id229

>From an ideological perspective, though, you should probably *be*
specifying those users and their full group membership in Puppet.

--Paul

On Thu, Nov 27, 2008 at 10:15 AM, udo waechter
<[EMAIL PROTECTED]> wrote:
> Thanks for the clarifications.
> I guess that making this operator a general one would be a huge endeavor.
>
> My initial wish, to add a user to a certain group would then be possible,
> without having the user's group specified elsewhere.
>
> Lets suppose we have a user 'test' which is a member of groups 'group1',
> 'group2'. This is not defined by puppet, but rather given by the OS.
>
> If I want to add the user 'test' to 'group3' I do need to:
>
> 1. find out in which groups it already is ('group1', 'group2'). This list
> could be different on different computers.
> 2. add the user to group3 like so:
>
> user{"test":
>        groups => ["group1","group2","group3"],
> }
>
> Would it be feasable to have the '+>' operator do step 1, then one would
> need to have only:
>
> user{"test":
>        groups +> "group3",
> }
>
> adding the user to group3 without loosing group1,group2
>
> Would this be a feature request? I guess the functionality I propose here is
> pretty unique to the user and group type.
>
> Bye,
> udo.
>
> On 26.11.2008, at 10:33, Aj wrote:
>
>>
>> That behaviour is used in resource overrides (inheritance)
>>
>> Given:
>>
>> class x {
>>  user { test: groups => blah }
>> }
>>
>> Additional values can be added in an override class.
>>
>> class y inherits x {
>>  User['test'] { groups +> blah2 }
>> }
>>
>> Regards,
>>
>> AJ
>>
>> On 26/11/2008, at 10:05 PM, Udo Waechter <[EMAIL PROTECTED]
>> osnabrueck.de> wrote:
>>
>>>
>>> Ouch,
>>> Documentation (
>>> http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial ) says its:
>>>
>>> "It is also possible (since version 0.23.1) to add values to resource
>>> parameters using the +> operator:"
>>>
>>> I am pretty sure, that I saw this sentence around for a while
>>> (definetly
>>> longer than .6), I just did not try it out.
>>>
>>> Are the docs wrong?
>>> udo.
>>>
>>> Aj wrote:
>>>>
>>>> That behavior was added in .6
>>>>
>>>> Regards,
>>>>
>>>> AJ
>>>>
>>>> On 26/11/2008, at 9:31 PM, Udo Waechter <[EMAIL PROTECTED]
>>>> osnabrueck.de> wrote:
>>>>
>>>>> Oh, sorry:
>>>>>
>>>>> - puppetmaster is 0.24.5 (Debian etch)
>>>>> - puppet clients are 0.24.5 (debian), and 0.24.4 (ubuntu hardy)
>>>>>
>>>>> Bye,
>>>>> udo.
>>>>>
>>>>> Paul Lathrop wrote:
>>>>>>
>>>>>> Udo,
>>>>>>
>>>>>> What version of Puppet are you running?
>>>>>>
>>>>>> --Paul
>>>>>>
>>>>>> On Tue, Nov 25, 2008 at 12:57 PM, udo waechter
>>>>>> <[EMAIL PROTECTED]> wrote:
>>>>>>>
>>>>>>> According to:
>>>>>>> http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial
>>>>>>> one can use the  '+>' operator to add additional  values to a
>>>>>>> parameter.
>>>>>>>
>>>>>>> In which cases does this actually work?
>>>>>>> When i try to add the user www-data to the ssl-cert group:
>>>>>>>
>>>>>>> user{"www-data":
>>>>>>>  groups +> "ssl-cert",
>>>>>>> }
>>>>>>>
>>>>>>> this does not work (.. Syntax error at '+>'; expected '}' at...).
>>>>>>> All
>>>>>>> examples in the docs add only other types to the 'require'
>>>>>>> parameters of
>>>>>>> types via this operator. Could it be that it does not work for all
>>>>>>> parameters?
>>>>>>>
>>>>>>> Or does the user-type do the "adding the user to the group" thing
>>>>>>> by itself?
>>>>>>>
>>>>>>> Thanks,
>>>>>>> udo.
>>>>>>> --
>>>>>>> :: udo waechter - [EMAIL PROTECTED] :: N 52º16'30.5" E 8º3'10.1"
>>>>>>> :: genuine input for your ears: http://auriculabovinari.de
>>>>>>> ::                          your eyes: http://ezag.zoide.net
>>>>>>> ::                          your brain: http://zoide.net
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>
>>>>
>>>>>
>>>>
>>>
>>>
>>>>
>>
>> >>
>>
>
> --
> :: udo waechter - [EMAIL PROTECTED] :: N 52º16'30.5" E 8º3'10.1"
> :: genuine input for your ears: http://auriculabovinari.de
> ::                          your eyes: http://ezag.zoide.net
> ::                          your brain: http://zoide.net
>
>
>
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to