puppet_list

puppet_list

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 实时性好,但无法记忆系统配置

上一篇:第一次独立使用ollydbg破解crackme测序


下一篇:金蝶K3 WISE BOM多级展开_销售成本表