本次只写思路&简单例子 ....入门级 -- 比较简单,键盘侠直接忽略 思路: 将ansible语句编写成简单的脚本 ybt root /etc/ansible #cat syl.sh #!/bin/bash ansible test -m shell -a 'df -h' 编写启动定时任务 ybt root /etc/ansible #crontab -l */1 * * * * /etc/ansible/syl.sh > /etc/ansible/ybttest.txt 监控结果 watch -b -n 10 'cat ybttest.txt'