从詹金斯调用Ansible时出现问题

时间:2019-04-13 12:08:31

标签: jenkins-pipeline

当我通过Jenkins调用Ansible时,我已在Playbook中添加了以下脚本

- name: HELLO WORLD PLAY
  hosts: webserver
  become: yes
  become_method: sudo
  tasks:
  - debug:
    msg: "HELLO......."
  - shell: echo "HELLO WORLD"

构建作业时出现错误

TASK [setup] *******************************************************************
fatal: [10.142.0.13]: UNREACHABLE! => 
{
  "changed": false, 
  "msg": "ERROR! SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue", 
  "unreachable": true
}

当我通过CLI运行此剧本时,它将成功运行 但是我无法遍历Jenkins,因为(我已经通过在Jenkins中粘贴私钥来完成设置)

0 个答案:

没有答案