# vi /etc/puppet/fileserver.conf [files] path /var/lib/puppet/server_data allow * # vi /etc/puppet/puppet.conf server_datadir = /var/lib/puppet/server_data file { "/tmp/nagios.tar": source => "puppet://master.puppet.net/files/nagios.tar", recurse => 'true'; } exec { "nagios_unzip": path => "/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin", command => "tar -xvf /tmp/nagios.tar -C /tmp;chmod +x /tmp/nagios_c.sh", require => File["/tmp/nagios.tar"]; } exec { "nagios_install": path => "/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin", command => "sh /tmp/nagios_c.sh", require => Exec["nagios_unzip"]; }
Puppet远程文件同步
原创
©著作权归作者所有:来自51CTO博客作者myxp的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:腾讯云服务器监控脚本
下一篇:钉钉消息监控
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
SSH,SCP远程复制文件,rsync同步
SSH,SCP远程复制文件,rsync同步
SSH 同步 rsync