www.cnblogs.com/ruiyqinrui

开源、架构、Linux C/C++/python AI BI 运维开发自动化运维。 春风桃李花 秋雨梧桐叶。“力尽不知热 但惜夏日长”。夏不惜,秋不获。@ruiY--秦瑞

python爬虫,C编程,嵌入式开发.hadoop大数据,桉树,onenebula云计算架构.linux运维及驱动开发.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

site.pp资源清单;

#files property;
file { "/home/1.txt":
owner => "root",
group => "root",
mode => 644,
}

#exec shell_scripts;
exec { "echo111":
cwd => "/tmp",
command => "echo abcd" >> /home/1.txt,
user => "root",
path => "/usr/local/sbin"
}

#files trans;
fileserver.conf
[abc]
path /etc/puppet/files
allow *
site.pp
file { "/home/test.txt":
source => "puppet://${puppet}/${abc}/test.txt",
}
[注,上面中的abc为在fileserver.conf中定义的模块]

#service status
service { "portmap":
ensure => "stopped",
}
[注,ensure共有2个参数,另外一个是running]

#cron set
cron { "test01": ensure => absent,
command => "(/bin/echo 123 > /home/ruiy/abc)",
user => "root",
minute => "*/3",
hour = ['2-4'],
monthday => "21",
month => "12",
weekday => "2",
# */3 2-4 21 12 2
}

ssh -np 33777 root@192.168.7.156 “svn up svn://192.168.7.135:9999/puppet /etc/puppet –username=puppet –password=puppet;sh /www/leary/run_client.sh”

Pupppet 用于管理系统配置。但实时性差
Func 实时性好,但无法记忆系统配置

 

posted on 2014-04-08 10:02  秦瑞It行程实录  阅读(368)  评论(0编辑  收藏  举报
www.cnblogs.com/ruiyqinrui