【问题标题】:How to download an artifact from nexus to a remote machine using Ansible playbook如何使用 Ansible playbook 从 nexus 下载工件到远程机器
【发布时间】:2019-01-29 12:58:38
【问题描述】:

我的要求是从 Nexus 3.x 存储库下载安装工件或 jar 文件,并使用 Ansible playbook 将其复制到远程主机。

我可以从 Ansible ping 远程主机。下面是剧本代码。

- hosts: 10.0.3.22
  tasks:
    - maven_artifact:
      group_id: com.setup
      artifact_id: customerfile
      repository_url: 'http://10.0.3.11:8081/repository/maven-releases/'
      username: uname
      password: pass
      dest: /tmp/customerfile.jar

出现错误 - 致命:[10.0.3.22]:失败! => {"changed": false, "msg": "group_id must be set"}

【问题讨论】:

    标签: ansible nexus


    【解决方案1】:

    错误的缩进问题:

    - maven_artifact:
        group_id: com.setup
        artifact_id: customerfile
        repository_url: 'http://10.0.3.11:8081/repository/maven-releases/'
        username: uname
        password: pass
        dest: /tmp/customerfile.jar
    

    【讨论】:

      猜你喜欢
      • 2021-11-04
      • 2014-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-12-23
      • 2014-04-13
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多