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 in Others by Sivakumar
• 130 points
69 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 in Others by Omkar
• 67,660 points
1,342 views
0 votes
1 answer

Installling PHP on windows

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

answered Feb 28 in Others by Anvi
• 13,960 points
87 views
0 votes
1 answer
0 votes
1 answer
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
40 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
69 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,380 points
213 views
0 votes
1 answer