重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
# 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"]; }