Ansible 剧本

Ansible 剧本

我正在尝试运行剧本来升级我网络上的几个边缘路由器上的最新固件:

- name: Update External ERX with latest firmware
  hosts: externaledgerouters
  remote_user: BudAdmin
  tasks:
   - name: Update ERX Firmware
     become: true
     shell: "add system image https://dl.ui.com/firmwares/edgemax/v2.0.9-hotfix.4/ER-e50.v2.0.9-hotfix.4.5521907.tar"

每当我在测试目标上运行它时,我都会收到有关任务的以下错误消息:

fatal: [ADM-TEST]: FAILED! => {"changed": true, "cmd": "add system image https://dl.ui.com/firmwares/edgemax/v2.0.9-hotfix.4/ER-e50.v2.0.9-hotfix.4.5521907.tar", "delta": "0:00:00.017078", "end": "2022-09-22 12:26:50.331550", "msg": "non-zero return code", "rc": 127, "start": "2022-09-22 12:26:50.314472", "stderr": "/bin/sh: add: command not found", "stderr_lines": ["/bin/sh: add: command not found"], "stdout": "", "stdout_lines": []}

我直接在边缘路由器上运行该命令,它可以工作,所以我不确定我在这里遗漏了什么。提前致谢。

相关内容