`groups` for the user module are handled differently than most other
modules allowing multiple values.  It explicitly requires a comma separated
string, and only splits on commas and doesn't strip the value.

It has been brought up before that the way it is handled is not ideal, but
never been fixed.  I'm not sure if there is a bug filed or not.

So right now, we'll just call it a "well known feature" ;)

But there are improvements that could be made.  Especially by setting that
parameter as a `list`, and not relying on a comma delimited string for
things.

On Tue, May 24, 2016 at 10:32 AM, Ricky <[email protected]> wrote:

> I was hunting down the cause to an error message I received when adding a
> user to some groups.
>
> - name: users | create app remote user
>>   user:
>>     name: "{{ app_remote_user }}"
>>     groups: adm, wheel
>>     createhome: yes
>>
>>
>  The error message was:
>
> msg: Group  wheel does not exist
>
>
> This error message was not true in the sense that the target system
> definitely had a wheel group, but I noticed the extra space in the error
> message, so the fix was:
>
> - name: users | create app remote user
>>   user:
>>     name: "{{ app_remote_user }}"
>>     groups: adm,wheel
>>     createhome: yes
>>
>>
>
> My question: Is this a bug in Ansible's interpretation of the groups
> parameter value?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/f2ecb455-7ca8-4e5e-b5af-a832c49868cb%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/f2ecb455-7ca8-4e5e-b5af-a832c49868cb%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v9GK06k-TBFRo1OWfoSFzgquBTHNF_24V0iF%2Bn3Cuk3ew%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to