【问题标题】:Ansible error using `win_copy`: "Unexpected failure during module execution"使用 `win_copy` 的 Ansible 错误:“模块执行期间发生意外失败”
【发布时间】:2020-04-17 07:41:27
【问题描述】:

我升级到 Python 3.5 并且 Ansible 部署开始失败,不确定它们是否相关,但这里是信息:

Ansible 版本:2.3.2

yaml文件:

  - name: Collect compiled DLLs for publishing
    win_copy:
      src: '{{ download_dir }}/tmp/xxxx/bin/Release/PublishOutput/bin/'
      dest: '{{ work_dir }}\bin'

错误:

{
  "failed": true,
  "msg": "Unexpected failure during module execution.",
  "stdout": ""
}

【问题讨论】:

    标签: deployment ansible ansible-2.x


    【解决方案1】:

    升级到 Ansible 2.5.1 以解决此问题。

    来自pull request的总结:

    win_copy 复制多个文件时,它有时会删除应该由多个模块使用的本地tmp 文件夹。这意味着需要访问此本地 tmp 文件夹的任何其他模块都将失败。

    我们在 ansible-test 中从未遇到过这种情况,因为我们在 localhost 上运行了一个 Python 模块,这导致 ansiballz 缓存阻止 win_copy 成功删除此文件夹。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-10-18
      • 2017-11-04
      • 2020-11-20
      • 2018-03-26
      • 2021-11-26
      • 2021-08-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多