Sorry, my fault. Was to busy with everything and after few hours I noticed 
that my post wasn't there. I created only but after a while I started to 
remember about an approval process... :-)


Op maandag 15 december 2014 13:05:23 UTC+1 schreef Michael DeHaan:
>
> Replied to another copy of this one :)
>
> First posts are moderated to prevent spam, so that's why we occasionally 
> approve duplicate posts.
>
> Sorry for confusion!
>
>
>
>
>
> On Sun, Dec 14, 2014 at 2:55 PM, Werner Dijkerman <[email protected] 
> <javascript:>> wrote:
>>
>> Hi there,
>>
>> I'm trying to setup an users role so that it will create users. This is 
>> not really difficult, but I only want to create users on a host if you are 
>> in a group. 
>>
>> I've got the following vars:
>> users:
>>  - name: "Werner Dijkerman"
>>    state: present
>>    uid: 1000
>>    gid: 1000
>>    groups: 
>>      - admin
>>      - monitor
>>
>> users_group:
>>  - admin
>>
>> And the following task:
>>  - name: Create user task
>>    user: name="{{ item.name }}" 
>>          state="{{ item.state }}" 
>>    with_items: "{{ users }}"
>>    when: users_group in item.groups
>>
>> When I run the playbook, it is "skipping" the "Create user task". I know 
>> I do miss some arguments in the user task. I would expect an error message 
>> instead of skipping the task.
>>
>> So when you are in the "admin" group, it will create you on the host. 
>> But this won't work. What am I missing or doing wrong?
>>
>> Kind regards,
>> Werner
>>
>> -- 
>> 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] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/c8a2f160-68bb-4189-a049-cf6cbc0edcb0%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/c8a2f160-68bb-4189-a049-cf6cbc0edcb0%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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/7a3759f0-c60b-4451-8489-91619c042535%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to