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.
192.168.56.101 | FAILED! => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python3"
},
"changed": false,
"msg": "useradd: Permission denied.\nuseradd: cannot lock /etc/passwd; try again later.\n",
"name": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"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
2,847 views

1 answer to this question.

0 votes

Hi@Konakanchl,

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,260 points

Related Questions In Ansible

0 votes
1 answer

Ansible Playbook for Creating a VM with OS and multiple data managed disks

Hey @Ammie, Try a playbook something like ...READ MORE

answered Mar 27, 2019 in Ansible by Stark
1,519 views
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,020 points
1,282 views
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
7,093 views
0 votes
1 answer

Issue while using lineinfile module - Ansible

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

answered Jan 17, 2019 in Ansible by Lavanya
974 views
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
828 views
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
843 views
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
777 views
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,260 points
2,866 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP