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
1,151 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,130 points
5,287 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,150 points
225 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,150 points
4,783 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
616 views
0 votes
1 answer

I would like to know the Steps involved to remove an Apache Solr from Windows 10 Computer

Hi@Ganapathy, There are several different possibilities for why ...READ MORE

answered Aug 17, 2020 in Others by MD
• 95,160 points
580 views
0 votes
1 answer

How to run two commands in one line in Windows CMD?

Hi@MD, You can use the Logical And operator ...READ MORE

answered Oct 5, 2020 in Others by akhtar
• 38,170 points
1,340 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,063 views
+2 votes
1 answer