189 8069 5689

Puppet远程文件同步

# 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远程文件同步
转载来于:http://cdxtjz.cn/article/gjgphc.html

其他资讯