配置文件的产生

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配置文件介绍的更多相关文章

  1. Apache源码包安装和子配置文件介绍--update.2014-12-5

    安装apache: 官网:http://httpd.apache.org/download.cgi#apache24 1.wget http://mirror.bit.edu.cn/apache//h ...

  2. .Net Core配置文件介绍

    Net Core中的配置文件介绍 1 简单回顾.Net Framework配置文件 .Net Core中的配置文件操作较.Net Framework有了很大的改动.介绍.Net Core中配置文件操作 ...

  3. 4 Redis 配置文件介绍

    2016-12-22 14:28:39 该系列文章链接NoSQL 数据库简介Redis的安装及及一些杂项基础知识Redis 的常用五大数据类型(key,string,hash,list,set,zse ...

  4. Logstash配置文件介绍

    Logstash配置文件介绍 Logstash配置文件有两种,分别是pipeline配置文件和setting配置文件. Pipeline配置文件主要定义logstash使用的插件以及每个插件的设置,定 ...

  5. Nginx服务配置文件介绍

    LNMP架构应用实战——Nginx服务配置文件介绍 nginx的配置文件比较简单,但功能相当强大,可以自由灵活的进行相关配置,因此,还是了解下其配置文件的一此信息 1.Nginx服务目录结构介绍 安装 ...

  6. Cas(03)——Cas Server中各配置文件介绍

    Cas Server中各配置文件介绍 Cas Server中所有的配置文件都是放在WEB-INF目录及其子目录下的. 在WEB-INF/classes下的配置文件有: l  cas-theme-def ...

  7. Springboot入门及配置文件介绍(内置属性、自定义属性、属性封装类)

    目的: 1.Springboot入门 SpringBoot是什么? 使用Idea配置SpringBoo使用t项目 测试案例 2.Springboot配置文件介绍 内置属性 自定义属性 属性封装类 Sp ...

  8. JavaWeb_(Mybatis框架)主配置文件介绍_四

    系列博文: JavaWeb_(Mybatis框架)JDBC操作数据库和Mybatis框架操作数据库区别_一 传送门 JavaWeb_(Mybatis框架)使用Mybatis对表进行增.删.改.查操作_ ...

  9. Puppet自动化运维-资源介绍篇(4)

    1.什么是资源? 资源是Puppet最基础的元素,每个资源的定义都具有标题,类型,以及一系列的属性. 资源定义有如下的特性:   (1) Puppet使用title在编译时区分每个资源,使用命名变量在 ...

随机推荐

  1. java.lang.NoClassDefFoundError Could not initialize class 异常的处理

    class,forname的配置文件出问题核对url数据库中的名字和bean中名字不同没有把jar包变成build path

  2. SPSS-相关性和回归分析(一元线性方程)案例解析

    任何事物和人都不是以个体存在的,它们都被复杂的关系链所围绕着,具有一定的相关性,也会具备一定的因果关系,(比如:父母和子女,不仅具备相关性,而且还具备因果关系,因为有了父亲和母亲,才有了儿子或女儿), ...

  3. (网络流 模板 Dinic) Drainage Ditches --POJ --1273

    链接: http://poj.org/problem?id=1273 代码: //Dinic #include<stdio.h> #include<string.h> #inc ...

  4. Android热补丁技术—dexposed原理简析(阿里Hao)

    本文由嵌入式企鹅圈原创团队成员.阿里资深工程师Hao分享. 上篇文章<Android无线开发的几种常用技术>我们介绍了几种android移动应用开发中的常用技术,其中的热补丁正在被越来越多 ...

  5. linux处理U盘中的资料-挂载-tar.gz软件安装-linux环境下软件的安装方式

    1. U盘插入linux一般会有以下反映 (1)/dev 的目录下,多出一个sdb的磁盘. 因为:目前系统中有两个硬盘, sda是原来的系统磁盘.sdb是插入的U盘. 其中:sdb1表示sdbU盘的一 ...

  6. JdbcTemplate详解

    1.JdbcTemplate操作数据库 Spring对数据库的操作在jdbc上面做了深层次的封装,使用spring的注入功能,可以把DataSource注册到JdbcTemplate之中.同时,为了支 ...

  7. Python学习-34.Python中os模块的一些方法(二)

    stat方法: 用于获取文件信息,例如创建时间.文件大小等. import os filestate=os.stat("e:/temp/test.txt") print(files ...

  8. Svn在eclipse中使用

            首先下载SvnAdt,我这里有个中文版的. 下载地址是  http://dl.vmall.com/c0i19tiqbq         你在其它地方下载的文件的话,解压文件后,把fea ...

  9. IE下 input 的父级标签被 disabled 之后引发的怪异行为

    前段时间做了个网盘类的项目,意外发现了这个情况 IE下,将input的父级标签增加 disabled 属性之后,input 的行为变得怪异: 1.input 背景变灰,疑似也被disabled 了. ...

  10. Golang Tcp粘包处理(转)

    在用golang开发人工客服系统的时候碰到了粘包问题,那么什么是粘包呢?例如我们和客户端约定数据交互格式是一个json格式的字符串: {"Id":1,"Name" ...