Skip to content

Commit 5050652

Browse files
jcpunkekohl
authored andcommitted
Fixes #35933 - Update for change from puppet master to server
1 parent 8a45aa7 commit 5050652

File tree

20 files changed

+149
-148
lines changed

20 files changed

+149
-148
lines changed

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[![Puppet Forge](https://img.shields.io/puppetforge/v/theforeman/puppet.svg)](https://forge.puppetlabs.com/theforeman/puppet)
22
[![CI](https://github.com/theforeman/puppet-puppet/actions/workflows/ci.yml/badge.svg?event=schedule)](https://github.com/theforeman/puppet-puppet/actions/workflows/ci.yml)
33

4-
# Puppet module for installing the Puppet agent and master
4+
# Puppet module for installing the Puppet agent and server
55

6-
Installs and configures the Puppet agent and optionally a Puppet master (when
6+
Installs and configures the Puppet agent and optionally a Puppet server (when
77
`server` is true). Part of the [Foreman installer](https://github.com/theforeman/foreman-installer)
88
or to be used as a Puppet module.
99

@@ -13,7 +13,7 @@ If you know you'll be installing an earlier or specific version, you will
1313
need to override `server_puppetserver_version`. More information in the Puppet
1414
Server section below.
1515

16-
Many puppet.conf options for agents, masters and other are parameterized, with
16+
Many puppet.conf options for agents, servers and other are parameterized, with
1717
class documentation provided at the top of the manifests. In addition, there
1818
are hash parameters for each configuration section that can be used to supply
1919
any options that are not explicitly supported.
@@ -37,7 +37,7 @@ These are set up under /etc/puppetlabs/code/environments.
3737

3838
Environments can be backed by git by setting `server_git_repo` to true, which
3939
sets up `/var/lib/puppet/puppet.git` where each branch maps to one environment.
40-
Avoid using 'master' as this name isn't permitted. On each push to the repo, a
40+
Avoid using 'server' as this name isn't permitted. On each push to the repo, a
4141
hook updates `/etc/puppet/environments` with the contents of the branch.
4242

4343
Requires [theforeman/git](https://forge.puppetlabs.com/theforeman/git).
@@ -64,10 +64,10 @@ Then the `foreman_ssl_{ca,cert,key}` parameters are ignored and `certs::puppet`
6464

6565
## PuppetDB integration
6666

67-
The Puppet master can be configured to export catalogs and reports to a
67+
The Puppet server can be configured to export catalogs and reports to a
6868
PuppetDB instance, using the puppetlabs/puppetdb module. Use its
6969
`puppetdb::server` class to install the PuppetDB server and this module to
70-
configure the Puppet master to connect to PuppetDB.
70+
configure the Puppet server to connect to PuppetDB.
7171

7272
Requires [puppetlabs/puppetdb](https://forge.puppetlabs.com/puppetlabs/puppetdb)
7373

@@ -100,9 +100,9 @@ wrapper classes or even your ENC (if it supports param classes). For example:
100100

101101
```puppet
102102
# Agent and cron (or daemon):
103-
class { 'puppet': runmode => 'cron' }
103+
class { 'puppet': runmode => 'cron', agent_server_hostname => 'hostname' }
104104
105-
# Agent and puppetmaster:
105+
# Agent and puppetserver:
106106
class { 'puppet': server => true }
107107
108108
# You want to use git?
@@ -121,7 +121,7 @@ class { 'puppet':
121121
server_post_hook_content => 'puppetserver/post-hook.puppet',
122122
}
123123
124-
# Configure master without Foreman integration
124+
# Configure server without Foreman integration
125125
class { 'puppet':
126126
server => true,
127127
server_foreman => false,
@@ -155,22 +155,22 @@ puppet apply install.pp --modulepath /path_to/extracted_tarball
155155

156156
# Advanced scenarios
157157

158-
An HTTP (non-SSL) puppetmaster instance can be set up (standalone or in addition to
158+
An HTTP (non-SSL) puppetserver instance can be set up (standalone or in addition to
159159
the SSL instance) by setting the `server_http` parameter to `true`. This is useful for
160160
reverse proxy or load balancer scenarios where the proxy/load balancer takes care of SSL
161-
termination. The HTTP puppetmaster instance expects the `X-Client-Verify`, `X-SSL-Client-DN`
161+
termination. The HTTP puppetserver instance expects the `X-Client-Verify`, `X-SSL-Client-DN`
162162
and `X-SSL-Subject` HTTP headers to have been set on the front end server.
163163

164164
The listening port can be configured by setting `server_http_port` (which defaults to 8139).
165165

166166
For puppetserver, this HTTP instance accepts **ALL** connections and no further restrictions can be configured.
167167

168-
**Note that running an HTTP puppetmaster is a huge security risk when improperly
168+
**Note that running an HTTP puppetserver is a huge security risk when improperly
169169
configured. Allowed hosts should be tightly controlled; anyone with access to an allowed
170170
host can access all client catalogues and client certificates.**
171171

172172
```puppet
173-
# Configure an HTTP puppetmaster vhost in addition to the standard SSL vhost
173+
# Configure an HTTP puppetserver vhost in addition to the standard SSL vhost
174174
class { '::puppet':
175175
server => true,
176176
server_http => true,

manifests/agent/config.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'localconfig': value => $puppet::localconfig;
77
'default_schedules': value => $puppet::agent_default_schedules;
88
'report': value => $puppet::report;
9-
'masterport': value => $puppet::port;
9+
'masterport': value => $puppet::agent_server_port;
1010
'environment': value => $puppet::environment;
1111
'splay': value => $puppet::splay;
1212
'splaylimit': value => $puppet::splaylimit;

manifests/config.pp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
# @api private
33
class puppet::config (
44
# lint:ignore:parameter_types
5-
$allow_any_crl_auth = $puppet::allow_any_crl_auth,
6-
$auth_allowed = $puppet::auth_allowed,
7-
$auth_template = $puppet::auth_template,
8-
$ca_server = $puppet::ca_server,
9-
$ca_port = $puppet::ca_port,
10-
$dns_alt_names = $puppet::dns_alt_names,
11-
$module_repository = $puppet::module_repository,
12-
$pluginsource = $puppet::pluginsource,
13-
$pluginfactsource = $puppet::pluginfactsource,
14-
$puppet_dir = $puppet::dir,
15-
$puppetmaster = $puppet::puppetmaster,
16-
$syslogfacility = $puppet::syslogfacility,
17-
$srv_domain = $puppet::srv_domain,
18-
$use_srv_records = $puppet::use_srv_records,
19-
$additional_settings = $puppet::additional_settings,
20-
$client_certname = $puppet::client_certname,
5+
$allow_any_crl_auth = $puppet::allow_any_crl_auth,
6+
$auth_allowed = $puppet::auth_allowed,
7+
$auth_template = $puppet::auth_template,
8+
$ca_server = $puppet::ca_server,
9+
$ca_port = $puppet::ca_port,
10+
$dns_alt_names = $puppet::dns_alt_names,
11+
$module_repository = $puppet::module_repository,
12+
$pluginsource = $puppet::pluginsource,
13+
$pluginfactsource = $puppet::pluginfactsource,
14+
$puppet_dir = $puppet::dir,
15+
$agent_server_hostname = $puppet::agent_server_hostname,
16+
$syslogfacility = $puppet::syslogfacility,
17+
$srv_domain = $puppet::srv_domain,
18+
$use_srv_records = $puppet::use_srv_records,
19+
$additional_settings = $puppet::additional_settings,
20+
$client_certname = $puppet::client_certname,
2121
# lint:endignore
2222
) {
2323
puppet::config::main {
@@ -53,7 +53,7 @@
5353
}
5454
} else {
5555
puppet::config::main {
56-
'server': value => pick($puppetmaster, $facts['networking']['fqdn']);
56+
'server': value => pick($agent_server_hostname, $facts['networking']['fqdn']);
5757
}
5858
}
5959
if $pluginsource {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
# Set a config entry in the [master] section
1+
# Set a config entry in the [server] section
22
#
33
# @param value
44
# The value for the config entry
55
# @param key
66
# The key of the config entry
77
# @param joiner
88
# How to join an array value into a string
9-
define puppet::config::master (
9+
define puppet::config::server (
1010
Variant[Array[String], Boolean, String, Integer] $value,
1111
String $key = $name,
1212
String $joiner = ','
1313
) {
14-
puppet::config::entry { "master_${name}":
14+
puppet::config::entry { "server_${name}":
1515
key => $key,
1616
value => $value,
1717
joiner => $joiner,
18-
section => 'master',
18+
section => 'server',
1919
sectionorder => 3,
2020
}
2121
}

manifests/init.pp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Can also install only server packages with value
2525
# of 'server' or only agent packages with 'agent'.
2626
#
27-
# $port:: Override the port of the master we connect to.
27+
# $agent_server_port:: Override the port of the server we connect to.
2828
#
2929
# $splay:: Switch to enable a random amount of time
3030
# to sleep before each run.
@@ -99,7 +99,7 @@
9999
# $syslogfacility:: Facility name to use when logging to syslog
100100
#
101101
# $use_srv_records:: Whether DNS SRV records will be used to resolve
102-
# the Puppet master
102+
# the Puppet server
103103
#
104104
# $srv_domain:: Search domain for SRV records
105105
#
@@ -171,7 +171,7 @@
171171
#
172172
# $agent_noop:: Run the agent in noop mode.
173173
#
174-
# $puppetmaster:: Hostname of your puppetmaster (server
174+
# $agent_server_hostname:: Hostname of your puppetserver (server
175175
# directive in puppet.conf)
176176
#
177177
# $prerun_command:: A command which gets excuted before each Puppet run
@@ -209,22 +209,22 @@
209209
#
210210
# == puppet::server parameters
211211
#
212-
# $server:: Should a puppet master be installed as well as the client
212+
# $server:: Should a puppet server be installed as well as the client
213213
#
214-
# $server_ip:: Bind ip address of the puppetmaster
214+
# $server_ip:: Bind ip address of the puppetserver
215215
#
216-
# $server_port:: Puppet master port
216+
# $server_port:: Puppet server port
217217
#
218218
# $server_ca:: Provide puppet CA
219219
#
220-
# $server_ca_crl_sync:: Sync puppet CA crl file to compile masters, Puppet CA Must be the Puppetserver
221-
# for the compile masters. Defaults to false.
220+
# $server_ca_crl_sync:: Sync puppet CA crl file to compilers, Puppet CA Must be the Puppetserver
221+
# for the compilers. Defaults to false.
222222
#
223223
# $server_crl_enable:: Turn on crl checking. Defaults to true when server_ca is true. Otherwise
224224
# Defaults to false. Note unless you are using an external CA. It is recommended
225225
# to set this to true. See $server_ca_crl_sync to enable syncing from CA Puppet Master
226226
#
227-
# $server_reports:: List of report types to include on the puppetmaster
227+
# $server_reports:: List of report types to include on the puppetserver
228228
#
229229
# $server_external_nodes:: External nodes classifier executable
230230
#
@@ -267,16 +267,16 @@
267267
#
268268
# $server_manage_user:: Whether to manage the server user resource
269269
#
270-
# $server_user:: Name of the puppetmaster user.
270+
# $server_user:: Username used for the puppetserver process
271271
#
272-
# $server_group:: Name of the puppetmaster group.
272+
# $server_group:: Group used for the puppetserver process
273273
#
274274
# $server_dir:: Puppet configuration directory
275275
#
276-
# $server_http:: Should the puppet master listen on HTTP as well as HTTPS.
276+
# $server_http:: Should the puppet server listen on HTTP as well as HTTPS.
277277
# Useful for load balancer or reverse proxy scenarios.
278278
#
279-
# $server_http_port:: Puppet master HTTP port; defaults to 8139.
279+
# $server_http_port:: Puppet server HTTP port; defaults to 8139.
280280
#
281281
# $server_foreman_facts:: Should foreman receive facts from puppet
282282
#
@@ -347,13 +347,13 @@
347347
# $server_default_manifest_content:: A string to set the content of the default_manifest
348348
# If set to '' it will not manage the file
349349
#
350-
# $server_package:: Custom package name for puppet master
350+
# $server_package:: Custom package name for puppet server
351351
#
352-
# $server_version:: Custom package version for puppet master
352+
# $server_version:: Custom package version for puppet server
353353
#
354354
# $server_ssl_dir:: SSL directory
355355
#
356-
# $server_ssl_dir_manage:: Toggle if ssl_dir should be added to the [master]
356+
# $server_ssl_dir_manage:: Toggle if ssl_dir should be added to the [server]
357357
# configuration section. This is necessary to
358358
# disable in case CA is delegated to a separate instance
359359
#
@@ -561,7 +561,7 @@
561561
#
562562
# include puppet
563563
#
564-
# * Installing a puppetmaster
564+
# * Installing a puppetserver
565565
#
566566
# class {'puppet':
567567
# server => true,
@@ -591,7 +591,7 @@
591591
Optional[String] $package_provider = $puppet::params::package_provider,
592592
Optional[Variant[String,Hash,Array]] $package_install_options = $puppet::params::package_install_options,
593593
Optional[Variant[Stdlib::Absolutepath, Stdlib::HTTPUrl]] $package_source = $puppet::params::package_source,
594-
Stdlib::Port $port = $puppet::params::port,
594+
Stdlib::Port $agent_server_port = $puppet::params::agent_server_port,
595595
Boolean $splay = $puppet::params::splay,
596596
Variant[Integer[0],Pattern[/^\d+[smhdy]?$/]] $splaylimit = $puppet::params::splaylimit,
597597
Variant[Boolean, Stdlib::Absolutepath] $autosign = $puppet::params::autosign,
@@ -637,7 +637,7 @@
637637
Boolean $agent = $puppet::params::agent,
638638
Boolean $report = $puppet::params::report,
639639
Variant[String, Boolean] $client_certname = $puppet::params::client_certname,
640-
Optional[String] $puppetmaster = $puppet::params::puppetmaster,
640+
Optional[String] $agent_server_hostname = $puppet::params::agent_server_hostname,
641641
String $systemd_unit_name = $puppet::params::systemd_unit_name,
642642
String $service_name = $puppet::params::service_name,
643643
Optional[String] $syslogfacility = $puppet::params::syslogfacility,
@@ -649,7 +649,7 @@
649649
String $server_group = $puppet::params::group,
650650
String $server_dir = $puppet::params::dir,
651651
String $server_ip = $puppet::params::ip,
652-
Stdlib::Port $server_port = $puppet::params::port,
652+
Stdlib::Port $server_port = $puppet::params::agent_server_port,
653653
Boolean $server_ca = $puppet::params::server_ca,
654654
Boolean $server_ca_crl_sync = $puppet::params::server_ca_crl_sync,
655655
Optional[Boolean] $server_crl_enable = $puppet::params::server_crl_enable,

manifests/params.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
$user = 'puppet'
88
$group = 'puppet'
99
$ip = '0.0.0.0'
10-
$port = 8140
10+
$agent_server_port = 8140
1111
$splay = false
1212
$splaylimit = 1800
1313
$runinterval = 1800
@@ -203,14 +203,14 @@
203203
$client_certname = $trusted['certname']
204204

205205
# Set by the Foreman ENC
206-
$puppetmaster = getvar('puppetmaster')
206+
$agent_server_hostname = getvar('puppetmaster')
207207

208208
# Hashes containing additional settings
209209
$additional_settings = {}
210210
$agent_additional_settings = {}
211211
$server_additional_settings = {}
212212

213-
# Will this host be a puppetmaster?
213+
# Will this host be a puppetserver?
214214
$server = false
215215
$server_ca = true
216216
$server_ca_crl_sync = false
@@ -223,7 +223,7 @@
223223
$server_http = false
224224
$server_http_port = 8139
225225

226-
# Need a new master template for the server?
226+
# Need a new server template for the server?
227227
$server_template = 'puppet/server/puppet.conf.erb'
228228
# Template for server settings in [main]
229229
$server_main_template = 'puppet/server/puppet.conf.main.erb'

0 commit comments

Comments
 (0)