执行脚本

1.执行本地脚本

[root@L ansible]# ansible test -m script -a '/root/shells/lnmp.sh' 

2.执行客户机上的脚本

[root@L ansible]# ansible test  -a '/root/lnmp.sh'
原文地址:https://www.cnblogs.com/ray-mmss/p/10173315.html