# 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