简介:今天咱们来聊聊saltstack一些注意事项和技巧
一 cronta模块
1 常用命令
salt * cron.raw_cron root ->查看某个用户的
2 如何管理以前的计划任务
crontab -e 编写在头部添加
# Lines below here are managed by Salt, do not edit
这样就算不是salt添加的计划任务也能被更改删除
3 编写sls
del_cron_jobs:
cron.absent:->present 添加删除只需要更改一个函数即可
- name: /data/scripts/a.sh
- user: root