Cannot create user

Hi,

can someone please show me what's wrong?

- name: create one single user
  user:
    user: "someguy"
    password: "something secret here"
    group: "users"
    state: "present"

does not create a user, but invokes usermod instead of useradd. Of
course, I get a message telling me that the user does not exist in
/etc/passwd. This is very correct.

Using no quotation marks around present or leaving them away completely
does not help.

I'm running ansible 2.5.0 on python version = 2.7.13.

Regards,
Werner

Werner Flamme [13.04.2018 16:18]:

Hi,

can someone please show me what's wrong?

- name: create one single user
  user:
    user: "someguy"
    password: "something secret here"
    group: "users"
    state: "present"

does not create a user, but invokes usermod instead of useradd. Of
course, I get a message telling me that the user does not exist in
/etc/passwd. This is very correct.

Using no quotation marks around present or leaving them away completely
does not help.

I'm running ansible 2.5.0 on python version = 2.7.13.

Regards,
Werner

First solution: use shorter user name. It works when "someguy" is
replaced with "exer". Originally, we use an 8 character user name.

Unfortunately, the usernames are not designed by me... I have to use
usernames with up to 8 characters.

Regards,
Werner

Werner Flamme [13.04.2018 16:30]:

Werner Flamme [13.04.2018 16:18]:

Hi,

can someone please show me what's wrong?

- name: create one single user
  user:
    user: "someguy"
    password: "something secret here"
    group: "users"
    state: "present"

does not create a user, but invokes usermod instead of useradd. Of
course, I get a message telling me that the user does not exist in
/etc/passwd. This is very correct.

Using no quotation marks around present or leaving them away completely
does not help.

I'm running ansible 2.5.0 on python version = 2.7.13.

Regards,
Werner

First solution: use shorter user name. It works when "someguy" is
replaced with "exer". Originally, we use an 8 character user name.

Unfortunately, the usernames are not designed by me... I have to use
usernames with up to 8 characters.

Regards,
Werner

Note to self: Do not try to create a user locally that is available via
LDAP when the system has a LDAP login... *cough*

Thanks for looking.

Werner