Answers:
代替
- name: create a new user
user: name=user
state=present
groups="group1, group2"
password={{ password }}
comment="Comment"
我做了
- name: create a new user
user: name=user
state=present
group=primary-group
groups="sudo"
password={{ password }}
comment="Comment"
并将用户添加到sudo组。
groups="www, sudo"
信息:组sudo不存在,在ubuntu 14