Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6896338
  • 博文数量: 3857
  • 博客积分: 6409
  • 博客等级: 准将
  • 技术积分: 15948
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 16:48
个人简介

迷彩 潜伏 隐蔽 伪装

文章分类

全部博文(3857)

文章存档

2017年(5)

2016年(63)

2015年(927)

2014年(677)

2013年(807)

2012年(1241)

2011年(67)

2010年(7)

2009年(36)

2008年(28)

分类: LINUX

2014-08-19 09:20:08

原文地址:SaltStack模块crontab 作者:gray1982

现在的服务器有些服务是确定要开启的,就像SSH一样,这里我就简单说下crontab服务
这里一共写了3个文件
cat service.sls 
{% if grains['os_family'] == 'RedHat' %}
cronie:
{% elif grains['os_family'] == 'Debian' %}
cron:
{% endif %}
    service:
        - running
        - enable: True

cat install.sls 
crontab:
    pkg.installed:
{% if grains['os_family'] == 'RedHat' %}
    - name: cronie
{% elif grains['os_family'] == 'Debian' %}
    - name: cron
{% endif %}

cat init.sls 
include:
    - crontab.install
    - crontab.service 
其实安装包这个有点多余,但以防万一吧,就都加上了
然后在服务器端执行 salt xxx  state.sls crontab 就可以单独使用这个模块了

%e6%a8%a1%e5%9d%97crontab/
阅读(509) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~