ansible的计划任务
cron 模块
作用: 批量添加周期计划任务
* * * * *
name:
state:
present 创建
absent 删除
minute: 0-59, *, */2
hour: 0-23, *, */2
day: 1-31, *, */2
month: 1-12, *, */2
weekday: 0-6 for Sunday-Saturday, *
job: 要执行的命令或者脚本
user: 默认是root
disabled: 禁用计划任务
ansible webservers -m cron -a “name=restart_httpd minute=00 hour=3 job=‘systemctl restart httpd’”