Hello!
Beginner here.  My goal is to use a simple play book to create a new user. 
   I found this example in the modules pages at ansible.com

# Add the user 'johnd' with a specific uid and a primary group of 'admin'
- user: name=johnd comment="John Doe" uid=1040 group=admin

I used that example and tried this:
---
- hosts: dev

  sudo: yes

  - name: create oracle user

- user: name=oracle uid=500 group=oinstall description=Oracle Service 
Account home=/u01/home/oracle

I got this error : ERROR: 'action' or 'local_action' attribute missing in task 
"create oracle user"

My second playbook iteration looked like this:


---
- hosts: dev
  sudo: yes

  tasks:
#  - name: create oinstall group
#    action: group name=oinstall gid=501

  - name: create oracle user
    action: user name=oracle uid=500 group=oinstall description=Oracle Service 
Account home=/u01/home/oracle

And I got this error:

PLAY [dev] ********************************************************************

GATHERING FACTS ***************************************************************
ok: [10.53.153.81]

TASK: [create oracle user] ****************************************************
failed: [10.53.153.81] => {"failed": true}
msg: this module requires key=value arguments (['name=oracle', 'uid=500', 
'group=oinstall', 'description=Oracle', 'Service', 'Account', 
'home=/u01/home/oracle'])

FATAL: all hosts have already failed -- aborting


Do the key=value pairs need to be enclosed in a different way. Which syntax 
is correct?

THanks in advance

Dave







-- 
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/aa943de2-53df-4850-8d19-ae2f29f3d883%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to