[root@toure1~]# ansible -i ansi all -a 'df -Ph | grep -i overf'
slave62 | FAILED | rc=1 >>
df: `|': No such file or directory
df: `grep': No such file or directory
df: `overf': No such file or directory
df: no file systems processed
[root@toure1~]# ansible -i ansi all -a "cat /etc/*release"
slave61 | FAILED | rc=1 >>
cat: /etc/*release: No such file or directory
可以采取哪些措施来解决错误。 有没有办法通过通配符
答案 0 :(得分:0)
这样做:
ansible -i ansi all -m shell -a "cat /etc/*release"