【发布时间】:2016-05-16 18:32:58
【问题描述】:
我正在尝试使用 Ansible 执行此命令:
- name: install node v5.5.0
sudo: yes
shell: nvm ls-remote
environment:
http_proxy: http://17.99.193.229:3128
https_proxy: http://17.99.193.229:3128
我尝试了 shell 和命令。
使用命令时:出现此错误:
"[Errno 2] No such file or directory", "rc": 2"
使用 shell 时:出现此错误:
"fatal: [gocdagent-dev-01.rno.apple.com]: FAILED! => {"changed": true, "cmd": "nvm ls-remote", "delta": "0:00:00.016365", "end": "2016-05-16 18:26:07.259729", "failed": true, "rc": 127, "start": "2016-05-16 18:26:07.243364", "stderr": "/bin/sh: nvm: command not found", "stdout": "", "stdout_lines": [], "warnings": []}"
我可以直接在系统上执行nvm 命令。为什么 Ansible 不能运行 nvm?
【问题讨论】: