Skip to content
Snippets Groups Projects
Commit 8d14785b authored by Jonathan Lent's avatar Jonathan Lent
Browse files

[puppetclient] Stripping special treatment for Puppet 2.X hosts

parent 13055c95
No related branches found
No related tags found
No related merge requests found
UNRELEASED
release/004.057 (2016-01-11)
[puppetclient] strip special treatment for Puppet 2.X hosts (jlent)
[pam] Stop overriding common PAM files with Debian jessie. (akkornel)
[ssh] Misc. filter-syslog cleanups. (akkornel)
......
......@@ -38,55 +38,13 @@ define base::puppetclient::config(
# The Puppet config file
$puppet_config = '/etc/puppet/puppet.conf'
if ($::hostname =~ /jimhenson|frankoz/) {
# CASE 1. Puppet 2.x
# The file /etc/puppet/puppet.conf is constructed by first writing
# the ERB template file templates/puppet.conf.template.erb into
# /etc/puppet/puppet.conf.template.
#
# We then convert /etc/puppet/puppet.conf.template into
# /etc/puppet/puppet.conf using generate_conf.
#
# Note that for generate-conf to work we must have the database ini
# file in place.
# Puppet masters need the database credentials file, so download
# the wallet object.
include base::puppetclient::db_credentials
$template_file = '/etc/puppet/puppet.conf.template'
$db_config = $puppetclient::db_credentials::puppet_db_ini_file
# 1. Install the template file.
file { $template_file:
content => template('base/puppetclient/puppet.conf.template.erb'),
mode => '0644',
owner => 'root',
group => 'root',
}
# 2. Convert the template file into /etc/puppet/puppet.conf.
exec { 'generate-conf puppet.conf':
command =>
"generate-conf --template ${template_file} --config ${db_config} --newfile ${puppet_config}",
refreshonly => true,
subscribe =>
[
File[$template_file],
Base::Wallet[$puppetclient::db_credentials::credentials_wallet_name],
]
}
} else {
# CASE 2. Puppet 3.x
file { $puppet_config:
content => template('base/puppetclient/puppet.conf.template.erb'),
mode => '0644',
owner => 'root',
group => 'root',
}
file { $puppet_config:
content => template('base/puppetclient/puppet.conf.template.erb'),
mode => '0644',
owner => 'root',
group => 'root',
}
} else {
# not $is_master
file { $name:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment