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