Permission denied error while building a project using Ansible on jenkins

0 votes

I've created a job in jenkins and I want to build the project using ansible but I get the following error:

/home/ubuntu/install.sh -s -U ubuntu -f 5
FATAL: command execution failed
java.io.IOException: Cannot run program "/usr/bin/ansible" (in directory "/var/lib/jenkins/jobs/Demo/workspace"): error=13, Permission denied
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
  at hudson.Proc$LocalProc.<init>(Proc.java:244)
  at hudson.Proc$LocalProc.<init>(Proc.java:216)
Apr 2 in Ansible by Laksha
44 views

1 answer to this question.

0 votes

Your Jenkins job is running as default user which does not have a shell and a shell would be required for Ansible. Try changing the user that you're using and let me know.

answered Apr 2 by Aleesha

Related Questions In Ansible

0 votes
3 answers
0 votes
1 answer

Error while creating resource group on Azure using Ansible

Hey, @Kiara seems like you're using an ...READ MORE

answered Mar 26 in Ansible by Olly
29 views
0 votes
1 answer

Running a playbook using Ansible on Jenkins

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

answered Apr 4 in Ansible by Akhil
125 views
0 votes
1 answer
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Error while installing Ansible on Azure

There are few dependencies that you need ...READ MORE

answered Mar 26 in Ansible by Derryl
17 views