puppet客户端自动安装shell脚本

#!/bin/bash
echo "Install puppet client start"
yum -y install ruby
mkdir -p /home/oldboy/tools/
cd /home/oldboy/tools/
unzip puppet.zip

cd /home/oldboy/tools/puppet
#wget http://projects.puppetlabs.com/attachments/download/1101/facter-1.5.8.tar.gz
#wget http://projects.puppetlabs.com/attachments/download/1114/puppet-2.6.1.tar.gz

tar xf facter-1.5.8.tar.gz
cd facter-1.5.8
ruby install.rb

echo "check facter"
facter

echo "install puppet"
cd /home/oldboy/tools/puppet
tar zxf puppet-2.6.1.tar.gz
cd puppet-2.6.1
ruby install.rb

echo "configure puppet"
cp /home/oldboy/tools/puppet/puppetEtc.tar.gz /etc/
cd /etc
tar zxvf puppetEtc.tar.gz

echo "add crontab"
cp /etc/crontab /etc/crontab.ori
echo "#*/1 * * * * root /bin/sh /etc/puppet/autopuppetl.sh 2>&1 &" >>/etc/crontab
chmod 700 /etc/puppet/autopuppet.sh




分割线
感谢打赏
江西数库信息技术有限公司
YWSOS.COM 平台代运维解决方案
 评论
 发表评论
姓   名:

Powered by AKCMS