Hi guys,

Could you please help me regarding to the following issue?

I have setup a control host and 2 managed host, IP Addresses are static and 
dns is over /etc/hosts file. SSH Keygen is created and copied to managed 
hosts and I can ssh to managed host without password.

Ansible installed:

*[ansible@control install]$ ansible --version*
*ansible 2.9.6*
*  config file = /home/ansible/install/ansible.cfg*
*  configured module search path = 
['/home/ansible/.ansible/plugins/modules', 
'/usr/share/ansible/plugins/modules']*
*  ansible python module location = 
/home/ansible/.local/lib/python3.6/site-packages/ansible*
*  executable location = /home/ansible/.local/bin/ansible*
*  python version = 3.6.8 (default, Nov 21 2019, 19:31:34) [GCC 8.3.1 
20190507 (Red Hat 8.3.1-4)]*

Note: *ansible1* and *ansible2 *are managed hosts.

When I add command -  ansible all -m user -a "name=lisa"- it gives the 
following message:

*ansible2 | FAILED! => {*
*    "ansible_facts": {*
*        "discovered_interpreter_python": "/usr/bin/python"*
*    },*
*    "changed": false,*
*    "msg": "useradd: Permission denied.\nuseradd: cannot lock /etc/passwd; 
try again later.\n",*
*    "name": "lisa",*
*    "rc": 1*
*}*
*ansible1 | FAILED! => {*
*    "ansible_facts": {*
*        "discovered_interpreter_python": "/usr/bin/python"*
*    },*
*    "changed": false,*
*    "msg": "useradd: Permission denied.\nuseradd: cannot lock /etc/passwd; 
try again later.\n",*
*    "name": "lisa",*
*    "rc": 1*

It took me a lot of time to find solution, but could not find anything. Is 
anyone faced with this error message


-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/4c947533-b4cc-44aa-a501-9602c8eb3438%40googlegroups.com.

Reply via email to