Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lonlone Lee
base
Commits
8d14785b
Commit
8d14785b
authored
Jan 11, 2016
by
Jonathan Lent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[puppetclient] Stripping special treatment for Puppet 2.X hosts
parent
13055c95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
49 deletions
+8
-49
NEWS
NEWS
+2
-1
manifests/puppetclient/config.pp
manifests/puppetclient/config.pp
+6
-48
No files found.
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