puppet的使用:puppet配置文件介绍
配置文件的产生
Puppet安装完后,配置文件就产生了,名称为puppet.conf,一般在/etc/puppet路径下。
master也可以通过命令:
puppet master --genconfig > puppet.conf
产生。
agent可以通过命令:
puppet agent --genconfig > puppet.conf
产生。
puppet配置文件一般包括main、master、agent这几个小节。
main
全局配置。
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
server=puppet.example.com
一般只需要修改server即可,server一般是master的hostname,同时也要在agent的/etc/hosts中配置。
master和agent的配置项太多,下面只是简单的罗列出来了,只把重要的几个配置项含义列了下,其他的可以参考对应的英文说明,通过前面命令生成的配置文件都会有对应配置项含义的说明
agent和master默认的监听端口都是8140,如果在一台机器上master和agent都要起,需要修改其中一个的端口
master
[master]
confdir = /etc/puppet #配置文件路径
vardir = /var/lib/puppet #puppet数据的存放位置
name = master
logdir = /var/lib/puppet/log
statedir = /var/lib/puppet/state
rundir = /var/lib/puppet/run
libdir = /var/lib/puppet/lib
route_file = /etc/puppet/routes.yaml
node_terminus = plain
node_cache_terminus = write_only_yaml
data_binding_terminus = hiera
hiera_config = /etc/puppet/hiera.yaml
catalog_terminus = compiler
facts_terminus = yaml
inventory_terminus = yaml
default_file_terminus = rest
httplog = /var/lib/puppet/log/http.log
http_keepalive_timeout = 4
filetimeout = 15
environment_timeout = 0
immutable_node_data = false
preview_outputdir = /var/lib/puppet/preview
csr_attributes = /etc/puppet/csr_attributes.yaml
certdir = /etc/puppet/ssl/certs
ssldir = /etc/puppet/ssl #ssl文件的存放位置,一般无需改动
publickeydir = /etc/puppet/ssl/public_keys
requestdir = /etc/puppet/ssl/certificate_requests
privatekeydir = /etc/puppet/ssl/private_keys
privatedir = /etc/puppet/ssl/private
passfile = /etc/puppet/ssl/private/password
hostcsr = /etc/puppet/ssl/csr_cuimiemie.pem
hostcert = /etc/puppet/ssl/certs/cuimiemie.pem
hostprivkey = /etc/puppet/ssl/private_keys/cuimiemie.pem
hostpubkey = /etc/puppet/ssl/public_keys/cuimiemie.pem
localcacert = /etc/puppet/ssl/certs/ca.pem
hostcrl = /etc/puppet/ssl/crl.pem
certificate_expire_warning = 5184000
plugindest = /var/lib/puppet/lib
pluginsource = puppet://puppet/plugins
pluginfactdest = /var/lib/puppet/facts.d
pluginfactsource = puppet://puppet/pluginfacts
factpath = /var/lib/puppet/lib/facter:/var/lib/puppet/facts
module_working_dir = /var/lib/puppet/puppet-module
module_skeleton_dir = /var/lib/puppet/puppet-module/skeleton
ca_name = Puppet CA: cuimiemie
cadir = /etc/puppet/ssl/ca
cacert = /etc/puppet/ssl/ca/ca_crt.pem
cakey = /etc/puppet/ssl/ca/ca_key.pem
capub = /etc/puppet/ssl/ca/ca_pub.pem
cacrl = /etc/puppet/ssl/ca/ca_crl.pem
capub = /etc/puppet/ssl/ca/ca_pub.pem
cacrl = /etc/puppet/ssl/ca/ca_crl.pem
caprivatedir = /etc/puppet/ssl/ca/private
csrdir = /etc/puppet/ssl/ca/requests
signeddir = /etc/puppet/ssl/ca/signed #这里会记录以前发的客户端,一般名称为agentHostname.pem
capass = /etc/puppet/ssl/ca/private/ca.pass
serial = /etc/puppet/ssl/ca/serial
autosign = /etc/puppet/autosign.conf #用于控制是否自动签发,默认是false
ca_ttl = 157680000
cert_inventory = /etc/puppet/ssl/ca/inventory.txt
config = /etc/puppet/puppet.conf
pidfile = /var/lib/puppet/run/master.pid
manifestdir = /etc/puppet/manifests
manifest = /etc/puppet/manifests/site.pp
masterlog = /var/lib/puppet/log/puppetmaster.log
masterhttplog = /var/lib/puppet/log/masterhttp.log
bucketdir = /var/lib/puppet/bucket
rest_authconfig = /etc/puppet/auth.conf
basemodulepath = /etc/puppet/modules:/usr/share/puppet/modules
modulepath = /etc/puppet/modules:/usr/share/puppet/modules #模块文件的存放路径
yamldir = /var/lib/puppet/yaml
server_datadir = /var/lib/puppet/server_data
reportdir = /var/lib/puppet/reports
fileserverconfig = /etc/puppet/fileserver.conf
storeconfigs_backend = active_record
rrddir = /var/lib/puppet/rrd
rrdinterval = 1800
devicedir = /var/lib/puppet/devices
deviceconfig = /etc/puppet/device.conf
node_name_value = cuimiemie
localconfig = /var/lib/puppet/state/localconfig
statefile = /var/lib/puppet/state/state.yaml
clientyamldir = /var/lib/puppet/client_yaml
client_datadir = /var/lib/puppet/client_data
classfile = /var/lib/puppet/state/classes.txt
resourcefile = /var/lib/puppet/state/resources.txt
puppetdlog = /var/lib/puppet/log/puppetd.log
runinterval = 1800
ca_server = puppet
ca_port = 8140
agent_catalog_run_lockfile = /var/lib/puppet/state/agent_catalog_run.lock
agent_disabled_lockfile = /var/lib/puppet/state/agent_disabled.lock
splaylimit = 1800
clientbucketdir = /var/lib/puppet/clientbucket
configtimeout = 120
report_server = puppet
report_port = 8140
inventory_server = puppet
inventory_port = 8140
lastrunfile = /var/lib/puppet/state/last_run_summary.yaml
lastrunreport = /var/lib/puppet/state/last_run_report.yaml
agent
[agent]
confdir = /etc/puppet
vardir = /var/lib/puppet
name = agent
logdir = /var/lib/puppet/log
statedir = /var/lib/puppet/state
rundir = /var/lib/puppet/run
libdir = /var/lib/puppet/lib
route_file = /etc/puppet/routes.yaml
node_terminus = rest
data_binding_terminus = hiera
hiera_config = /etc/puppet/hiera.yaml
catalog_terminus = rest
catalog_cache_terminus = json
facts_terminus = facter
inventory_terminus = facter
default_file_terminus = rest
httplog = /var/lib/puppet/log/http.log
http_keepalive_timeout = 4
filetimeout = 15
environment_timeout = 0
immutable_node_data = false
preview_outputdir = /var/lib/puppet/preview
csr_attributes = /etc/puppet/csr_attributes.yaml
certdir = /etc/puppet/ssl/certs
ssldir = /etc/puppet/ssl
publickeydir = /etc/puppet/ssl/public_keys
requestdir = /etc/puppet/ssl/certificate_requests
privatekeydir = /etc/puppet/ssl/private_keys
privatedir = /etc/puppet/ssl/private
passfile = /etc/puppet/ssl/private/password
hostcsr = /etc/puppet/ssl/csr_cuimiemie.pem
hostcert = /etc/puppet/ssl/certs/cuimiemie.pem
hostprivkey = /etc/puppet/ssl/private_keys/cuimiemie.pem
hostpubkey = /etc/puppet/ssl/public_keys/cuimiemie.pem
localcacert = /etc/puppet/ssl/certs/ca.pem
hostcrl = /etc/puppet/ssl/crl.pem
certificate_expire_warning = 5184000
plugindest = /var/lib/puppet/lib
pluginsource = puppet://puppet/plugins
pluginfactdest = /var/lib/puppet/facts.d
pluginfactsource = puppet://puppet/pluginfacts
factpath = /var/lib/puppet/lib/facter:/var/lib/puppet/facts
module_working_dir = /var/lib/puppet/puppet-module
module_skeleton_dir = /var/lib/puppet/puppet-module/skeleton
ca_name = Puppet CA: cuimiemie
cadir = /etc/puppet/ssl/ca
cacert = /etc/puppet/ssl/ca/ca_crt.pem
cakey = /etc/puppet/ssl/ca/ca_key.pem
capub = /etc/puppet/ssl/ca/ca_pub.pem
cacrl = /etc/puppet/ssl/ca/ca_crl.pem
caprivatedir = /etc/puppet/ssl/ca/private
csrdir = /etc/puppet/ssl/ca/requests
signeddir = /etc/puppet/ssl/ca/signed
capass = /etc/puppet/ssl/ca/private/ca.pass
serial = /etc/puppet/ssl/ca/serial
autosign = /etc/puppet/autosign.conf
ca_ttl = 157680000
cert_inventory = /etc/puppet/ssl/ca/inventory.txt
config = /etc/puppet/puppet.conf
pidfile = /var/lib/puppet/run/agent.pid
manifestdir = /etc/puppet/manifests
manifest = /etc/puppet/manifests/site.pp
masterlog = /var/lib/puppet/log/puppetmaster.log
masterhttplog = /var/lib/puppet/log/masterhttp.log
bucketdir = /var/lib/puppet/bucket
rest_authconfig = /etc/puppet/auth.conf
basemodulepath = /etc/puppet/modules:/usr/share/puppet/modules
modulepath = /etc/puppet/modules:/usr/share/puppet/modules
yamldir = /var/lib/puppet/yaml
server_datadir = /var/lib/puppet/server_data
reportdir = /var/lib/puppet/reports
fileserverconfig = /etc/puppet/fileserver.conf
storeconfigs_backend = active_record
rrddir = /var/lib/puppet/rrd
rrdinterval = 1800
devicedir = /var/lib/puppet/devices
deviceconfig = /etc/puppet/device.conf
node_name_value = cuimiemie
localconfig = /var/lib/puppet/state/localconfig
statefile = /var/lib/puppet/state/state.yaml
clientyamldir = /var/lib/puppet/client_yaml
client_datadir = /var/lib/puppet/client_data
classfile = /var/lib/puppet/state/classes.txt
resourcefile = /var/lib/puppet/state/resources.txt
puppetdlog = /var/lib/puppet/log/puppetd.log
runinterval = 1800 #这个时间是客户端主动向master请求数据的时间间隔,单位默认是s
ca_server = puppet
ca_port = 8140
agent_catalog_run_lockfile = /var/lib/puppet/state/agent_catalog_run.lock
agent_disabled_lockfile = /var/lib/puppet/state/agent_disabled.lock
splaylimit = 1800
clientbucketdir = /var/lib/puppet/clientbucket
configtimeout = 120
report_server = puppet
report_port = 8140 #客户端监听的端口号,一般也无需改动
inventory_server = puppet
inventory_port = 8140
lastrunfile = /var/lib/puppet/state/last_run_summary.yaml
lastrunreport = /var/lib/puppet/state/last_run_report.yaml
graphdir = /var/lib/puppet/state/graphs
waitforcert = 120
archive_file_server = puppet
tagmap = /etc/puppet/tagmail.conf
dblocation = /var/lib/puppet/state/clientconfigs.sqlite3
railslog = /var/lib/puppet/log/rails.log
templatedir = /var/lib/puppet/templates
puppet的使用:puppet配置文件介绍的更多相关文章
- Apache源码包安装和子配置文件介绍--update.2014-12-5
安装apache: 官网:http://httpd.apache.org/download.cgi#apache24 1.wget http://mirror.bit.edu.cn/apache//h ...
- .Net Core配置文件介绍
Net Core中的配置文件介绍 1 简单回顾.Net Framework配置文件 .Net Core中的配置文件操作较.Net Framework有了很大的改动.介绍.Net Core中配置文件操作 ...
- 4 Redis 配置文件介绍
2016-12-22 14:28:39 该系列文章链接NoSQL 数据库简介Redis的安装及及一些杂项基础知识Redis 的常用五大数据类型(key,string,hash,list,set,zse ...
- Logstash配置文件介绍
Logstash配置文件介绍 Logstash配置文件有两种,分别是pipeline配置文件和setting配置文件. Pipeline配置文件主要定义logstash使用的插件以及每个插件的设置,定 ...
- Nginx服务配置文件介绍
LNMP架构应用实战——Nginx服务配置文件介绍 nginx的配置文件比较简单,但功能相当强大,可以自由灵活的进行相关配置,因此,还是了解下其配置文件的一此信息 1.Nginx服务目录结构介绍 安装 ...
- Cas(03)——Cas Server中各配置文件介绍
Cas Server中各配置文件介绍 Cas Server中所有的配置文件都是放在WEB-INF目录及其子目录下的. 在WEB-INF/classes下的配置文件有: l cas-theme-def ...
- Springboot入门及配置文件介绍(内置属性、自定义属性、属性封装类)
目的: 1.Springboot入门 SpringBoot是什么? 使用Idea配置SpringBoo使用t项目 测试案例 2.Springboot配置文件介绍 内置属性 自定义属性 属性封装类 Sp ...
- JavaWeb_(Mybatis框架)主配置文件介绍_四
系列博文: JavaWeb_(Mybatis框架)JDBC操作数据库和Mybatis框架操作数据库区别_一 传送门 JavaWeb_(Mybatis框架)使用Mybatis对表进行增.删.改.查操作_ ...
- Puppet自动化运维-资源介绍篇(4)
1.什么是资源? 资源是Puppet最基础的元素,每个资源的定义都具有标题,类型,以及一系列的属性. 资源定义有如下的特性: (1) Puppet使用title在编译时区分每个资源,使用命名变量在 ...
随机推荐
- flex 分页
<?xml version="1.0" encoding="utf-8"?><s:Group xmlns:fx="http://ns ...
- Nginx中间件使用心得(二)
一.基础知识补充 1. 历史由来补充: Nginx是俄罗斯第二大网站的开源项目. 淘宝团队发行了 tengine 增加了很多第三方的包. 2.下载相关的主键 (1)nginx下载地址 ...
- redis之单机和主从环境搭建
单机环境搭建 官网http://redis.io/download下载xxx.tar.gz二进制压缩包,注意下载2.8+版本,2.8之前的版本之前从服务器不支持部分重复制,2.6之前的版本不支持set ...
- MongoDB安装为Windows服务方法与注意事项
MongoDB作为一个基于分布式文件存储的数据库,近两年大受追捧.数据灵活的存取方式和高效的处理使得它广泛用于互联网应用. 最近本人开始在Windows 32位平台下研究MongoDB的使用,为了方便 ...
- 1) Spring_HelloWorld
1. Spring Tool Suite™ 方式一:下载对应eclipse版本的文件,离线安装 4.4.2 springsource-tool-suite-3.6.4.RELEASE-e4.4.2-u ...
- jmeter 5.0版本更新说明(个人做个记录)
变化 此页面仅详细说明了当前版本中所做的更改. 先前更改的历史记录中详细介绍了早期更改. 5.0版 摘要 新的和值得注意的 不兼容的变化 Bug修复 改进 非功能性变化 已知问题和解决方法 谢 ...
- ( KMP 求循环节的个数)Power Strings -- poj -- 2406
链接: http://poj.org/problem?id=2406 Power Strings Time Limit:3000MS Memory Limit:65536KB 64bi ...
- springmvc 孔浩 hibernate code
model--User package model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; ...
- function [eigf,eigv,dof]=laplaceeig(node,elem,problem)
function [eigf,eigv,dof]=laplaceeig(node,elem,problem) % -boundary eigenvalue problem % problem='0-b ...
- 团队项目(第四周之一)—GG队
Alpha认领任务: 叶尚文:对应键盘监听结果的动画以及计算 于泽浩:制作背景gif图,并保证能在程序中循环播放 龙剑初:项目进度跟进及博客更新 杜婷萱:把图片结合起来,设置云朵透明度的变化 蔡晓晴: ...