update erb
This commit is contained in:
@@ -25,6 +25,9 @@
|
||||
# @param [string] pt_db_user_home the user home for the puppetdb user
|
||||
# @param [string] pt_db_user_shell the shell for the puppetdb user
|
||||
# @param [boolean] pt_use_puppetdb whether to use puppetdb on host
|
||||
# @param [string] pt_environment the environment
|
||||
# @param [boolean] pt_basemodulepath the base module path
|
||||
# @param
|
||||
###############################################################################
|
||||
class puppet_cd::params (
|
||||
|
||||
@@ -56,6 +59,34 @@ class puppet_cd::params (
|
||||
String $pt_db_user_comment = 'PuppetDB daemon',
|
||||
String $pt_db_user_home = '/opt/puppetlabs/server/data/puppetdb',
|
||||
String $pt_db_user_shell = '/sbin/nologin',
|
||||
# templates
|
||||
String $pt_environment = 'production',
|
||||
Boolean $pt_allow_duplicate_certs = false,
|
||||
String $pt_basemodulepath = '/etc/puppetlabs/code/environments/common:/etc/puppetlabs/code/modules:/opt/puppetlabs/puppet/modules:/usr/share/puppet/modules',
|
||||
String $pt_logdir = '/var/log/puppetlabs/puppet',
|
||||
String $pt_pluginfactsource = 'pluginfacts',
|
||||
String $pt_pluginsource = 'plugins',
|
||||
String $pt_reports = 'foreman',
|
||||
Boolean $pt_show_diff = false,
|
||||
Boolean $pt_default_schedules = false,
|
||||
Boolean $pt_listen = false,
|
||||
String $pt_masterport = '8140',
|
||||
Boolean $pt_noop = false,
|
||||
Boolean $pt_pluginsync = true,
|
||||
Boolean $pt_report = true,
|
||||
String $pt_runinterval = '1800',
|
||||
Boolean $pt_splay = false,
|
||||
String $pt_splaylimit = '1800',
|
||||
Boolean $pt_usecacheonfailure = true,
|
||||
String $pt_autosign = '/etc/puppetlabs/puppet/autosign.conf',
|
||||
Boolean $pt_ca = true,
|
||||
String $pt_external_nodes = '/etc/puppetlabs/puppet/node.rb',
|
||||
String $pt_logdir_master = '/var/log/puppetlabs/puppetserver',
|
||||
String $pt_node_terminus = 'exec',
|
||||
Boolean $pt_strict_variables = false,
|
||||
Boolean $pt_storeconfigs = true,
|
||||
String $pt_storeconfigs_backend = 'puppetdb',
|
||||
String $pt_parser = 'current,
|
||||
|
||||
) {
|
||||
$fqdn = $facts['networking']['fqdn']
|
||||
|
||||
@@ -3,10 +3,67 @@
|
||||
###############################################################################
|
||||
|
||||
<% if @fqdn == @pt_pm_fqdn -%>
|
||||
[main]
|
||||
basemodulepath = <%= @pt_basemodulepath %>
|
||||
certname = <%= @fqdn %>
|
||||
codedir = <%= @pt_code_dir %>
|
||||
environmentpath = <%= @pt_environmentspath %>
|
||||
hiera_config = <%= @pt_hiera_config %>
|
||||
hostprivkey = $privatekeydir/$certname.pem { mode = 640 }
|
||||
logdir = <%= @pt_logdir %>
|
||||
pluginfactsource = puppet:///<%= @pt_pluginfactsource %>
|
||||
pluginsource = puppet:///<%= @pt_pluginsource %>
|
||||
privatekeydir = <%= @pt_privatekeydir %> { group = service }
|
||||
reports = <%= @pt_reports %>
|
||||
rundir = <%= @pt_rundir %>
|
||||
server = <%= @pt_puppet_server %>
|
||||
show_diff = <%= @pt_show_diff %>
|
||||
ssldir = <%= @pt_ssldir %>
|
||||
vardir = <%= @pt_vardir %>
|
||||
|
||||
<% if @pt_use_puppetdb == true %>
|
||||
[agent]
|
||||
classfile = $statedir/classes.txt
|
||||
default_schedules = <%= @pt_default_schedules %>
|
||||
environment = <%= @pt_environment %>
|
||||
masterport = <%= @pt_masterport %>
|
||||
noop = <%= @pt_noop %>
|
||||
pluginsync = <%= @pt_pluginsync %>
|
||||
report = <%= @pt_report %>
|
||||
runinterval = <%= @pt_runinterval %>
|
||||
splay = <%= @pt_splay %>
|
||||
splaylimit = <%= @pt_splaylimit %>
|
||||
usecacheonfailure = <%= @pt_usecacheonfailure %>
|
||||
|
||||
[server]
|
||||
autosign = <%= @pt_autosign %> { mode = 0664 }
|
||||
ca = <%= @pt_ca %>
|
||||
certname = <%= @fqdn %>
|
||||
external_nodes = <%= @pt_external_nodes %>
|
||||
logdir = <%= @pt_logdir_master %>
|
||||
node_terminus = <%= @pt_node_terminus %>
|
||||
parser = <%= @pt_parser %>
|
||||
rundir = <%= @pt_rundir_master %>
|
||||
ssldir = <%= @pt_ssldir %>
|
||||
strict_variables = <%= @pt_strict_variables %>
|
||||
vardir = <%= @pt_vardir_master %>
|
||||
<% if @pt_use_puppetdb != true %>
|
||||
storeconfigs = false
|
||||
<% end -%>
|
||||
<% if @pt_use_puppetdb == true %>
|
||||
storeconfigs = true
|
||||
storeconfigs_backend = <%= @pt_storeconfigs_backend %>
|
||||
<% end end -%>
|
||||
<% if @fqdn != @pt_pm_fqdn -%>
|
||||
|
||||
[agent]
|
||||
classfile = $statedir/classes.txt
|
||||
default_schedules = <%= @pt_default_schedules %>
|
||||
environment = <%= @pt_environment %>
|
||||
masterport = <%= @pt_masterport %>
|
||||
noop = <%= @pt_noop %>
|
||||
pluginsync = <%= @pt_pluginsync %>
|
||||
report = <%= @pt_report %>
|
||||
runinterval = <%= @pt_runinterval %>
|
||||
splay = <%= @pt_splay %>
|
||||
splaylimit = <%= @pt_splaylimit %>
|
||||
usecacheonfailure = <%= @pt_usecacheonfailure %>
|
||||
<% end -%>
|
||||
Reference in New Issue
Block a user