标签:ble direct led failed man hostname hang errno director
Centos7.5 执行ansible命令报错
问题:
[root@m01 ~]# ansible servers -a "hostname|grep web" -i ./hosts
172.16.1.7 | FAILED | rc=2 >>
[Errno 2] No such file or directory
原因:
默认使用的是command模块,command模块不能使用管道
解决方法:
使用shell模块执行命令
[root@m01 ~]# ansible servers -m shell -a "hostname|grep web" -i ./hosts
172.16.1.7 | CHANGED | rc=0 >>
web01
[Errno 2] No such file or directory
标签:ble direct led failed man hostname hang errno director
原文地址:https://www.cnblogs.com/lvhanzhi/p/10439257.html