Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44739

sshpass ignored in jenkins job?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • ansible-plugin
    • None
    • jenkins 2.53
      Ansible plugin 0.6.2
      Ansible 1.5.4

      I have jenkins with ansible plugin and ansible all on the same machine.

      I have a playbook, the key line being

      local_action: command sshpass -f /home/user/passwordfile ssh user@mint-gitlab-vm ls

      Just to add this is just testing things and I used sshpass as I just wanted to try something, in reality I would use ssh keys. So much for quick ....

      Anyway, when I run this playbook from the command line, it works, it prints out the listing.

      But when I run it within a jenkins job, I get the following error

      stderr: Host key verification failed.

      Which suggests it is ignoring sshpass and looking for keys.

      So, I simply run local_action: command sshpass -V

      and that worked as expected, showing the version info. So sshpass is not ignored. But neither is the password being accepted by ssh.

      Any ideas? Or is this a bug?

      Regards,

            sirot Jean-Christophe Sirot
            norricorp John Norris
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: