Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lonlone Lee
base
Commits
8d14785b
Commit
8d14785b
authored
Jan 11, 2016
by
Jonathan Lent
Browse files
[puppetclient] Stripping special treatment for Puppet 2.X hosts
parent
13055c95
Changes
2
Hide whitespace changes
Inline
Side-by-side
NEWS
View file @
8d14785b
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
)
...
...
manifests/puppetclient/config.pp
View file @
8d14785b
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment