Ansible and Jenkins

71 views
Skip to first unread message

Sai Prasha

unread,
Jan 28, 2020, 5:58:05 AM1/28/20
to Ansible Project
I Installed Anisble Server on Windows by enabling WSL (Windows system for Linux ) having Ubuntu Client
Now I have Jenkins Installed on the same Windows machine but when i try to run simple ansible command i am seeing the below Error .
My question is that the jenkins server also has to be installed from Ubuntu Client on windows.


Started by user ADMIN
Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\Adhoc
[Adhoc] $ sh -xe C:\WINDOWS\TEMP\jenkins946870556263797578.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
Caused: java.io.IOException: Cannot run program "sh" (in directory "C:\Program Files (x86)\Jenkins\workspace\Adhoc"): CreateProcess error=2, The system cannot find the file specified
	at java.lang.ProcessBuilder.start(Unknown Source)
	at hudson.Proc$LocalProc.<init>(Proc.java:250)
	at hudson.Proc$LocalProc.<init>(Proc.java:219)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:936)
	at hudson.Launcher$ProcStarter.start(Launcher.java:454)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
	at hudson.model.Build$BuildExecution.build(Build.java:206)
	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1853)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:428)
Build step 'Execute shell' marked build as failure
Finished: FAILURE

P. Varsha

unread,
Jan 28, 2020, 6:25:39 AM1/28/20
to ansible...@googlegroups.com
setup the ubuntu root directory path on the jenkins environment.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/68788e70-839e-4d01-8bbc-691f7bf86707%40googlegroups.com.

Sai Prasha

unread,
Jan 28, 2020, 8:17:53 AM1/28/20
to ansible...@googlegroups.com
yes , i did that , but still i see the same issue

Sai Prasha

unread,
Jan 28, 2020, 8:21:58 AM1/28/20
to Ansible Project
I have set the Ansible path in jenkins ->Manage Jenkins->Global tool Configuration - ansible 2.5.1 path /usr/bin/ansible
I could not execute bash command from jenkins where as it is working form cmd
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages