Hi Kiran, The jenkins is not able to remotely execute the ansible command. The installation field in the global configuration must contain the path of the directory where the ansible binaries are installed. Note that in the last release of the plugin this configuration is not required anymore when ansible is available in the PATH environment variable.
There are two possible solutions: either you install ansible on your Jenkins server or you setup your Ansible server as a Jenkins slave. Hope this helps. -- Jean-Christophe Le mercredi 3 février 2016 02:46:33 UTC+1, Kiran a écrit : > > My Ansible (version 1.9.5) server is on its own dedicated CentOS 7 > server. My Jenkins (version 1.6) server is on its own dedicated CentOS 7 > server. I installed the Ansible plugin for Jenkins. I created a New Item > that invokes an ad-hoc Ansible command. For the Ansible Installation > field, I enter the DNS name of the Ansible server. For host pattern, I > chose the group of servers that I want the Ansible playbook to run again. > The group name was defined in the .../ansible/hosts file. > > The console output of this new Jenkins job that should invoke an ansible > command (on a separate server with Ansible installed) says this: > > "Building in workspace /var/lib/jenkins/jobs/... $ sshpass ****** /ansible > ... DNSnameOfAnsibleServer -i ... FATAL: command execution failed > hudson.AbortException: Ansible Ad-Hoc command execution failed at > org.jenkinsci.plugins.ansible.AnsibleAdHocCommandBuilder.perform(AnsibleAdHocCommandBuilder.java:176 > > at ..." > > Does the Ansible server need sshpass? The Jenkins server has sshpass. > > How do I get Jenkins to invoke an ansible playbook on an Ansible server? > This error makes me think that something is wrong with sshpass. I can view > the man page of sshpass. Is there a certain version that I need? > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/355e9637-710d-475c-a7ea-e729bb6a597d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
