Having some trouble with the user module in Ansible. Everything is technically working, just not as I expected. It seems Ansible uses "useradd" versus the newer "adduser" in Ubuntu and I think its missing some configuration settings when creating users. If I let Ansible create the user, the account is created and active but the account behaves a bit strangely. In particualar, the user@hostname prompt is not present. I did confirm that it is using /bin/bash. All I get as a prompt for Ansible created users is $. Doesnt even display current working directory. I want to use Ansible to create the admin accounts, but not if its going to behave like this. If however I create the user manually using adduser in the OS, the account gets setup as expected. Any thoughts?
Ansible user prompt:
Manual user created prompt:
Here is an example user portion of the playbook:
- name: Add user user: name: Username password: 'Password Hash' groups: sudo state: present