*Wow! that was a lightning fast reply :D*

On Wednesday, September 3, 2014 7:35:09 PM UTC+8, Michael DeHaan wrote:
>
> In your first example, you can't stick a "when:" twice in a single task.
>
>
*Thanks for telling that, now I know* :)
 

> You can feed it a list of multiple conditionals, but I think your problem 
> is you are missing a "-" to seperate two different tasks.
>
>



*Sorry I'm pretty confused with this. What I really wanted to do is to 
automate creating users (which were sysad dudes) for every new server we 
build. But the problem is, the DEFAULT user included on /etc/sudoers file 
were different on Ubuntu (%sudo) and CentOS (%wheel).So I stick a "when:" 
twice in a single task. * 

> However, in the text below, there are other questions and problems, such 
> as "username" vs "user", which I suspect selects a module, and other 
> duplicated fields, like "groups".   
>
>
*If you mean text below was this:* 
- username: same_as_above_username
    name: full_name_of_user
    groups: ['wheel']
    uid: 1001
*Sorry I paste it wrong.*

 

> Another problem is the when is indented and not at "task" level, though 
> the module should yell to you about being sent a parameter it doesn't know 
> about.
>
>
*I thought "when" must be indented? Which was sampled here: 
http://docs.ansible.com/playbooks_conditionals.html#the-when-statement* 

-- 
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/97fb4c03-97b0-4d81-87f2-5a4ca8269500%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to