run ansible-playbook from jenkins on windows

+1 vote

I installed jenkins on windows machine.  Ansible is also installed in Windows and accessing through Linux subsystem  using CYGWIN. I am able to run ansible play from "cygwin".

I am getting below error from jenkins, if i run ansible play book from jenkins jobs. ( i have installed Ansible plugin and call the ansible playbook from "Invoke Ansible-Playbook option from build properties.

Started by user XXXXXXX

Running as SYSTEM
Building in workspace C:\Program Files (x86)\Jenkins\workspace\TestingSimpleAnsibleJob
[TestingSimpleAnsibleJob] $ ansible-playbook /usr/bin/lib/projects/sample1/my-ansible.yml -f 5
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "ansible-playbook" (in directory "C:\Program Files (x86)\Jenkins\workspace\TestingSimpleAnsibleJob"): CreateProcess error=2, The system cannot find the file specified
Nov 4, 2019 in Others by Sivakumar
• 130 points
597 views
Hello @Sivakumar, I hope you are doing good.

When there is an error saying "cannot find the file specified" or "cannot find the directory", make sure your ansible is available on that path.

Can you please check if the path is updated correctly while using pip?

Thanks!

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Others

0 votes
1 answer

Call third party .exe from windows service c#

Hi @Priyanka! The reason this is not working ...READ MORE

answered Feb 28, 2019 in Others by Omkar
• 69,040 points
3,667 views
0 votes
1 answer

Installling PHP on windows

As @Abha and @Abhi suggested, its best ...READ MORE

answered Feb 28, 2019 in Others by Anvi
• 14,050 points
139 views
0 votes
1 answer

How to run C# code on Ubuntu

Hey @Abha, you can create and run ...READ MORE

answered Mar 1, 2019 in Others by Anvi
• 14,050 points
2,295 views
0 votes
1 answer

Install MQTT on windows 10

hey @Greg, go to the following link ...READ MORE

answered Jul 8, 2019 in Others by Mahi
203 views
0 votes
0 answers

why linux is more secure than windows?

which features make linux more secure than ...READ MORE

Jul 11, 2018 in Others by kristena1234
• 160 points
65 views
0 votes
1 answer

Events & Threading in Windows Forms

I don't think you should be updating ...READ MORE

answered Nov 9, 2018 in Others by nirvana
• 3,060 points
118 views
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
534 views
0 votes
1 answer