Ubuntu 16.04搭建puppet服务

Ubuntu 16.04搭建puppet服务:服务器

Puppet是一种配置管理工具,可帮助系统管理员自动执行服务器基础架构的配置和管理。架构

1、安装软件curl

master:ide

curl -O https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb

dpkg -i puppetlabs-release-pc1-xenial.deb

apt-get update

apt-get install puppetserver

ln -s /opt/puppetlabs/bin/puppet /usr/bin/

systemctl start puppetserver

systemctl enable puppetserver

agent:工具

curl -O https://apt.puppetlabs.com/puppetlabs-release-pc1-xenial.deb

dpkg -i puppetlabs-release-pc1-xenial.deb

apt-get update

apt-get install puppet-agent

ln -s /opt/puppetlabs/bin/puppet /usr/bin/

systemctl start puppet

systemctl enable puppet

2、证书签名url

agent:code

vi /etc/hosts

10.0.0.2 puppet (puppet master服务器)
:wq server

puppet agent -t

master:ip

puppet cert list

puppet cert sign puppeta.ming.com (根据上1步的显示)

1次性部署全部请求:部署

puppet cert sign --all

3、推送验证

master:

vi /etc/puppetlabs/code/environments/production/manifests/site.pp

file {'/tmp/it_works.txt':
ensure => present,
mode => '0644',
content => "It works on ${ipaddress_eth0}!\n",
}
:wq

agent:

puppet agent -t

cat /tmp/it_works.txt

相关文章
相关标签/搜索