Puppet远程文件同步
发表于:2024-11-28 作者:热门IT资讯网编辑
编辑最后更新 2024年11月28日,# vi /etc/puppet/fileserver.conf[files] path /var/lib/puppet/server_data allow *# vi /etc/puppet/p
# vi /etc/puppet/fileserver.conf[files] path /var/lib/puppet/server_data allow *# vi /etc/puppet/puppet.confserver_datadir = /var/lib/puppet/server_datafile {"/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"]; }