[root@master tmp]# ansible slave -m shell -a ‘date -s "2016/5/13 13:12"‘
client02 | SUCCESS | rc=0 >>
Fri May 13 13:12:00 CST 2016
agent.test.com | SUCCESS | rc=0 >>
Fri May 13 13:12:00 CST 2016
注意:上面的command 可以换成shell
原文:http://blog.51cto.com/wujianwei/2082897