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
2,710 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,210 points
8,121 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
838 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
6,000 views
0 votes
1 answer

Install MQTT on windows 10

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

answered Jul 9, 2019 in Others by Mahi
1,247 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 18, 2020 in Others by MD
• 95,440 points
2,599 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,230 points
6,120 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,518 views
+2 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP