-
server system-test 10.152.14.85
-
client xuesong 10.152.14.106
-
系统centos5.8
两台配置都配置
-
/etc/hosts
-
10.152.14.85 system-test
-
10.152.14.106 xuesong
-
wget
-
rpm -Uvh epel-release-5-4.noarch.rpm
服务端安装
-
yum install -y puppet-server
-
sed -i '/ssldir/ a autosign=true' /etc/puppet/puppet.conf
-
sed -i '/autosign/ a autosign=\/etc\/puppet\/autosign\.conf' /etc/puppet/puppet.conf
-
echo "*" > /etc/puppet/autosign.conf
-
service puppetmasterd start
-
setenforce 0
客户端安装
-
yum install -y puppet
-
cat >>/etc/sysconfig/puppet<
-
PUPPET_SERVER=$ser
-
PUPPET_PORT=8140
-
PUPPET_LOG=/var/log/puppet/puppet.log
-
EOF
-
echo "runinterval=300" >> /etc/puppet/puppet.conf
-
service puppet start
客户端生成一个 SSL 证书并指定发给 Puppet 服务端
-
puppet agent --no-daemonize --onetime --verbose --debug --server=system-test
客户端测试与服务端
-
puppetd --test --server system-test
服务端查看通过签名的客户端
使用
# 服务端添加任务
-
vi /etc/puppet/manifests/site.pp
-
node default {
-
file {
-
"/tmp/helloworld.txt": content => "hello, world";
-
}
-
}
等待runinterval 指定的时间,查看客户端是否成功 cat /tmp/helloworld.txt
阅读(811) | 评论(0) | 转发(0) |