I have added a user without home directory. But still the task is failed.
Please check if i missed out any step.
[root@stapp01 tony]# useradd ammar -M
[root@stapp01 tony]# cat /etc/passwd
. . .
. . .
ammar:x:1002:1002::/home/ammar:/bin/bash
[root@stapp01 tony]# useradd -M ammar
useradd: user ‘ammar’ already exists
[root@stapp01 tony]# cd /home/ammar
bash: cd: /home/ammar: No such file or directory
[root@stapp01 tony]# ls /home
ansible tony