一、Master端

配置文件:

[root@puppet puppet]# vi puppet.conf 

 [master]

    bindaddress = 0.0.0.0

    masterport = 8140

    ssldir = /etc/puppet/server_ssl

    logdir = /data/puppet

    manifest = /etc/puppet/manifests/site.pp

    modulepath = /etc/puppet/modules

    certname = puppet.example.com

    autosign = /etc/puppet/autosign.conf

    autosign = true 

 [agent]

    report = true

其中:autosign是设置自动认证授权

[root@puppet puppet]# cat autosign.conf 

*.example.com

二、Agent端

在puppet.conf中[agent]加入:server = puppet.example.com 

三、手动认证

agent: puppet agent --test --debug

master: puppet cert --list

master: puppet cert --sign xx #对应的客户机名

四、注意事项

容易出现问题的是证书认证环节,在这个环节可能导致证书出问题的情况有很多种,比较重要是系统时间不统一导致的,SSL连接依赖主机上的系统时间,可通过NTP来尽量确保机器时间的正确和统一。