ansible ssh and user module issue with edureka VM

0 votes

i have created a new ssh token with edureka user and copied the same to another vm which was setup as slave.
now i am trying to use the ansible user module to create a user, i see below error. | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
"changed": false,
"msg": "useradd: Permission denied.\nuseradd: cannot lock /etc/passwd; try again later.\n",
"rc": 1

second time i have generated ssh token using root user and trying to copy it to slave machine using ssh-copy-id root@ip...but its asking root pasword, i have given edureka. it didnt  work


Jul 23, 2020 in Ansible by Konakanchi
• 120 points

1 answer to this question.

0 votes


I guess you need to give your user name at the time of coping with your SSH key. Try this below command.

$ ssh-copy-id root@IP
answered Jul 23, 2020 by akhtar
• 38,210 points

Related Questions In Ansible

0 votes
1 answer
0 votes
2 answers

Issue creating AWS VPC with Ansible

You can use the details given in ...READ MORE

answered Aug 16, 2018 in Ansible by Priyaj
• 58,140 points
0 votes
1 answer

How to use Ansible git module pull a branch with local changes?

You cannot achieve it using the git ...READ MORE

answered Jul 9, 2018 in Ansible by Atul
• 10,240 points
0 votes
1 answer

Issue while using lineinfile module - Ansible

The lineinfile task has to match both the ...READ MORE

answered Jan 16, 2019 in Ansible by Lavanya
0 votes
1 answer

User on the target VM - Ansible

Yes @Nisha, You can run a shell ...READ MORE

answered Jan 28, 2019 in Ansible by Kavya
0 votes
1 answer
0 votes
1 answer

Considerations when dealing with backup and restoration - Ansible

Hey @Ruth, keep these following factors in ...READ MORE

answered Feb 4, 2019 in Ansible by Anushri
0 votes
1 answer

Configuration for setting up windows VM using ansible and vagrant

Hey @Leena,  your configuration file group_vars/windows-dev should contain something like: ansible_user: ...READ MORE

answered Feb 4, 2019 in Ansible by Vaishu
0 votes
1 answer

How to replace a line using lineinfile module in Ansible?

Hi@MD, You can use lineinfile module in Ansible. ...READ MORE

answered Sep 2, 2020 in Ansible by akhtar
• 38,210 points