Permission denied when running ansible playbook through jenkins

0 votes

I'm unable to run ansible playbook via jenkins. The logs say permission denied but if run the same from putty directly it exdecutes successfully.

Jun 25, 2018 in Ansible by shubham
• 7,340 points
4,131 views

1 answer to this question.

0 votes
Jenkins uses it's own user to execute its commands on its hosts i.e. jenkins uses jenkins user to execute any command. For while connecting with remote on your ansible, you used your default/current host as ssh host and not jenkins.

To run ansible commands via jenkins you need to SSH into host using jenkins user.
answered Jun 25, 2018 by DareDev
• 6,890 points

Related Questions In Ansible

0 votes
1 answer

Error saying permission denied while running ansible playbook

Hey @Neha, add the following line to ...READ MORE

answered Feb 8, 2019 in Ansible by Amy
15,862 views
0 votes
1 answer

Permission denied while running the playbook

Hey @Hari, try executing your playbook using ...READ MORE

answered Feb 9, 2019 in Ansible by Monish
4,007 views
0 votes
1 answer
0 votes
1 answer

Running a playbook using Ansible on Jenkins

Hey, @Asha seems like you've added a ...READ MORE

answered Apr 4, 2019 in Ansible by Akhil
3,488 views
0 votes
1 answer

Not able to connect remote host via jenkins to run ansible playbook

set "host_key_checking = False" in /etc/ansible/ansible.cfg READ MORE

answered Dec 2, 2019 in Jenkins by pavan

reshown Dec 2, 2019 by Vardhan 10,213 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,034 views
+1 vote
2 answers

Running ansible command on a single server when it is deployed to multiple servers

You can try the run_once attribute: Example from ...READ MORE

answered Jun 14, 2018 in Ansible by DareDev
• 6,890 points
2,464 views
0 votes
1 answer

ansible playbook: using multiple variables in loops

Use an indexed hostname, and then define ...READ MORE

answered Jul 16, 2018 in Ansible by DareDev
• 6,890 points
18,986 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