使用puppet
首先配置一个默认文件 只是首次创建的时候才需要重启,后期不需要重启!
[root@master manifests]# vim /etc/puppet/manifests/site.pp
node default {
file {
"/tmp/test1111": #这是文件路径名;
content =>"This is test of PUPPET" #这是文件的内容;
}
file {
"/tmp/logclean.sh": #这是文件路径名;
owner => "root",
group => "puppet",
content => "find /log/ -type f -size +10KB | xgrep rm -rf\n", #这是文件的内容;
mode => "0777"
}
group {
"test" #添加组
gid => "999",
ensure => present,
}
user { "puppet-test": #添加用户
password => '123456',
uid => 999,
gid => 999,
home => "/home/puppet-test",
shell => "/bin/bash"
}
}