Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67209

Cannot run program ansible-playbook

XMLWordPrintable

      Hi Team,

      I'm not able to execute ansible-playbook via plugin. When I hope in to the system foundĀ file is exist on the path tried to run same playbook manually from the same path it is working flawlessly.

      Please find the jenkins pipeline (plugin) logs below.

      [workspace] $ ansible-playbook clone-repo.yml -i inventory --private-key /Users/codiant/.jenkins/jobs/Sample-Node/workspace/ssh10574020522.key -u ubuntu
       FATAL: command execution failed
       java.io.IOException: Cannot run program "ansible-playbook" (in directory "/Users/rounak/.jenkins/jobs/Sample-Node/workspace"): error=2, No such file or directory
       at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
       at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
       at hudson.Proc$LocalProc.<init>(Proc.java:252)
       at hudson.Proc$LocalProc.<init>(Proc.java:221)
       at hudson.Launcher$LocalLauncher.launch(Launcher.java:995)
       at hudson.Launcher$ProcStarter.start(Launcher.java:507)
       at hudson.Launcher$ProcStarter.join(Launcher.java:518)
       at org.jenkinsci.plugins.ansible.CLIRunner.execute(CLIRunner.java:49)
       at org.jenkinsci.plugins.ansible.AbstractAnsibleInvocation.execute(AbstractAnsibleInvocation.java:290)
       at org.jenkinsci.plugins.ansible.AnsiblePlaybookInvocation.execute(AnsiblePlaybookInvocation.java:31)
       at org.jenkinsci.plugins.ansible.AnsiblePlaybookBuilder.perform(AnsiblePlaybookBuilder.java:261)
       at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:430)
       at org.jenkinsci.plugins.ansible.workflow.AnsiblePlaybookStep$AnsiblePlaybookExecution.run(AnsiblePlaybookStep.java:351)
       at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
       at hudson.security.ACL.impersonate2(ACL.java:449)
       at hudson.security.ACL.impersonate(ACL.java:461)
       at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
       at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
       at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
       at java.base/java.lang.Thread.run(Thread.java:829)
       Caused by: java.io.IOException: error=2, No such file or directory
       at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
       at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:340)
       at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:271)
       at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)

            sirot Jean-Christophe Sirot
            rouna_cod Rounak Jain
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: