我正在尝试执行的功能:列表命令卡拉夫对centos 7与ansible剧本。
在终端上运行此命令可以正常工作:
sudo /opt/runtimeV8/Talend-Runtime-V8.0.1/bin/start;sleep 30;/opt/runtimeV8/Talend-Runtime-V8.0.1/bin/client -r 20 feature:list > /tmp/log.txt
我想用Ansible运行相同的命令,但最后一个命令出错。
- name: Command 1
shell: sudo /opt/runtimeV8/Talend-Runtime-V8.0.1/bin/start
- name: Command 2
command: sleep 30
- name: Command 3
shell: /opt/runtimeV8/Talend-Runtime-V8.0.1/bin/client feature:list > /tmp/log.txt
ignore_errors: true
即使是忽略错误似乎也改变不了什么大事。
"msg": "non-zero return code"
并且日志文件只包含输出的第一行:
1条答案
按热度按时间2lpgd9681#
应使用批处理模式,命令将变为:
answer found here : https://stackoverflow.com/questions/70355095/unable-to-run-client-command-for-apache-karaf-4-3-3-through-remote-server