end
end
$ cat master.sh
echo '*' > /etc/puppet/autosign.conf
sed -i '/[.*]/ a \ autosign = true' /etc/puppet/puppet.conf # add "autosign = true" in [main] and [agent]
echo "192.168.50.3 puppet.boco.com.cn puppet" >> /etc/hosts
echo "192.168.50.4 web.boco.com.cn web" >> /etc/hosts
mkdir /etc/puppet/manifests
cat > /etc/puppet/manifests/site.pp <<-EOF
node 'web' {
file { '/home/vagrant/aaa.conf':
content => 'this is made by puppet master!',
}
}
EOF
service iptables stop
$ cat web.sh
sed -i '1 a \ master = puppet' /etc/puppet/puppet.conf # add "master = puppet" after the line [main]
echo "192.168.50.3 puppet.boco.com.cn puppet" >> /etc/hosts
echo "192.168.50.4 web.boco.com.cn web" >> /etc/hosts
echo "proxy=http://10.21.3.31:8888" >> /etc/yum.conf
service iptables stop
Now run "puppet master --no-daemonize --verbose" on ppt, run "puppet agent --test" on web, you can file the file "aaa.conf" at /home/vagrant.