So, I wanted to create a new user with password on a host machine using ansible.
This is the play I wrote:
hosts:appservers
user:test
sudo:yes
gather_facts:yes
var :
password:centos
task:
- name: creating user
user: name=john password={{password}}
after I executed the above playbook, I tried to login with that user on another server using:
[root]# su - test
But it didn't ask for password to login
[test@localhost ~]$
Why isn't it asking for password?