Skip to content

Commit 689d121

Browse files
committed
Drop Puppet 6 support
1 parent 769ce70 commit 689d121

File tree

17 files changed

+30
-395
lines changed

17 files changed

+30
-395
lines changed

.fixtures.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
fixtures:
22
repositories:
3-
augeas_core:
4-
repo: 'https://github.com/puppetlabs/puppetlabs-augeas_core'
5-
puppet_version: '>= 6.0.0'
3+
augeas_core: 'https://github.com/puppetlabs/puppetlabs-augeas_core'
64
concat: 'https://github.com/puppetlabs/puppetlabs-concat.git'
7-
cron_core:
8-
repo: 'https://github.com/puppetlabs/puppetlabs-cron_core'
9-
puppet_version: '>= 6.0.0'
5+
cron_core: 'https://github.com/puppetlabs/puppetlabs-cron_core'
106
extlib: 'https://github.com/voxpupuli/puppet-extlib.git'
117
git: 'https://github.com/theforeman/puppet-git.git'
128
inifile: 'https://github.com/puppetlabs/puppetlabs-inifile.git'

README.md

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,15 @@ 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

10-
When using Puppet Server (version 5.3.6 is the lowest version, this module supports),
11-
the module supports and assumes you will be installing the latest version.
12-
If you know you'll be installing an earlier or specific version, you will
13-
need to override `server_puppetserver_version`. More information in the Puppet
14-
Server section below.
15-
1610
Many puppet.conf options for agents, servers and other are parameterized, with
1711
class documentation provided at the top of the manifests. In addition, there
1812
are hash parameters for each configuration section that can be used to supply
1913
any options that are not explicitly supported.
2014

21-
## Upgrading from Puppetserver 6 to 7
22-
23-
Puppetserver 7 moves the CA files from ssldir to its own. To move the existing
24-
files, `puppetserver ca migrate` can be used but this requires the puppetserver
25-
to be stopped. The module does run this command if needed, but doesn't stop the
26-
service so the application will fail.
15+
## Compatibility
2716

28-
It is recommended to run this command directly after updating the packages. It
29-
leaves a symlink so the old config should continue to work.
17+
See the module metadata for supported operating systems and compatible Puppet
18+
versions. The Puppetserver version should also match this.
3019

3120
## Environments support
3221

@@ -178,14 +167,6 @@ class { '::puppet':
178167
}
179168
```
180169

181-
## Puppet Server configuration
182-
183-
Puppet Server requires slightly different configuration between different
184-
versions, which this module supports. It's recommended that you set the
185-
`server_puppetserver_version` parameter to the MAJOR.MINOR.PATCH version
186-
you have installed. By default the module will configure for the latest
187-
version available.
188-
189170
# Contributing
190171

191172
* Fork the project

manifests/config.pp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# lint:ignore:parameter_types
55
$allow_any_crl_auth = $puppet::allow_any_crl_auth,
66
$auth_allowed = $puppet::auth_allowed,
7-
$auth_template = $puppet::auth_template,
87
$ca_server = $puppet::ca_server,
98
$ca_port = $puppet::ca_port,
109
$dns_alt_names = $puppet::dns_alt_names,
@@ -101,15 +100,4 @@
101100
}
102101
}
103102
}
104-
105-
if versioncmp($facts['puppetversion'], '7.0.0') >= 0 {
106-
file { "${puppet_dir}/auth.conf":
107-
ensure => absent,
108-
}
109-
} else {
110-
file { "${puppet_dir}/auth.conf":
111-
ensure => file,
112-
content => template($auth_template),
113-
}
114-
}
115103
}

manifests/init.pp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@
152152
# Windows and ['systemd.timer'] on other
153153
# systems.
154154
#
155-
# $auth_template:: Use a custom template for /etc/puppetlabs/puppet/auth.conf
156-
#
157155
# $pluginsource:: URL to retrieve Puppet plugins from during pluginsync
158156
#
159157
# $pluginfactsource:: URL to retrieve Puppet facts from during pluginsync
@@ -406,7 +404,6 @@
406404
# 'TLS_RSA_WITH_AES_128_CBC_SHA256', 'TLS_RSA_WITH_AES_128_CBC_SHA', ]
407405
#
408406
# $server_ruby_load_paths:: List of ruby paths
409-
# Defaults based on $::puppetversion
410407
#
411408
# $server_ca_client_whitelist:: The whitelist of client certificates that
412409
# can query the certificate-status endpoint
@@ -425,10 +422,6 @@
425422
# $server_ca_client_self_delete:: Adds a rule to auth.conf, that allows a client to delete its own certificate
426423
# Defaults to false
427424
#
428-
# $server_use_legacy_auth_conf:: Should the puppetserver use the legacy puppet auth.conf?
429-
# Defaults to false (the puppetserver will use its own conf.d/auth.conf)
430-
# Note that Puppetserver 7 has dropped this option.
431-
#
432425
# $server_check_for_updates:: Should the puppetserver phone home to check for available updates?
433426
# Defaults to true
434427
#
@@ -448,16 +441,13 @@
448441
# Defaults to 30000, using the Jetty default of 30s
449442
#
450443
# $server_puppetserver_metrics:: Enable puppetserver http-client metrics
451-
# Defaults to true, matching defaults in Puppetserver 5+.
452444
#
453445
# $server_puppetserver_profiler:: Enable JRuby profiling.
454-
# Defaults to true, matching defaults in Puppetserver 5+.
455446
# If set to false, compiler and function metrics will not be available, (eg. when enabling graphite metrics)
456447
#
457448
# $server_puppetserver_telemetry:: Enable Dropsonde telemetry.
458449
# Undef means disabled while booleans are explicit opt-in or opt-out.
459450
# This is different from Puppetserver's default values.
460-
# Only valid since Puppetserver 7.
461451
#
462452
# $server_metrics_jmx_enable:: Enable or disable JMX metrics reporter. Defaults to true
463453
#
@@ -571,7 +561,7 @@
571561
#
572562
# class {'puppet':
573563
# agent_noop => true,
574-
# version => '6.15.0-1',
564+
# version => '7.24.0-1',
575565
# }
576566
#
577567
class puppet (
@@ -630,7 +620,6 @@
630620
String $classfile = $puppet::params::classfile,
631621
String $hiera_config = $puppet::params::hiera_config,
632622
String $localconfig = $puppet::params::localconfig,
633-
String $auth_template = $puppet::params::auth_template,
634623
Boolean $allow_any_crl_auth = $puppet::params::allow_any_crl_auth,
635624
Array[String] $auth_allowed = $puppet::params::auth_allowed,
636625
Variant[String, Array[String]] $client_package = $puppet::params::client_package,
@@ -723,7 +712,6 @@
723712
Integer[0] $server_max_queued_requests = $puppet::params::server_max_queued_requests,
724713
Integer[0] $server_max_retry_delay = $puppet::params::server_max_retry_delay,
725714
Boolean $server_multithreaded = $puppet::params::server_multithreaded,
726-
Boolean $server_use_legacy_auth_conf = $puppet::params::server_use_legacy_auth_conf,
727715
Boolean $server_check_for_updates = $puppet::params::server_check_for_updates,
728716
Boolean $server_environment_class_cache_enabled = $puppet::params::server_environment_class_cache_enabled,
729717
Boolean $server_allow_header_cert_info = $puppet::params::server_allow_header_cert_info,

manifests/params.pp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,6 @@
189189
$package_source = undef
190190
$package_install_options = undef
191191

192-
# Need your own config templates? Specify here:
193-
$auth_template = 'puppet/auth.conf.erb'
194-
195192
# Allow any to the CRL. Needed in case of puppet CA proxy
196193
$allow_any_crl_auth = false
197194

@@ -399,9 +396,6 @@
399396

400397
$server_puppetserver_version = undef
401398

402-
# Which auth.conf shall we use?
403-
$server_use_legacy_auth_conf = false
404-
405399
# Puppetserver metrics shipping
406400
$server_metrics_jmx_enable = true
407401
$server_metrics_graphite_enable = false

manifests/server.pp

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@
229229
# 'TLS_RSA_WITH_AES_128_CBC_SHA256', 'TLS_RSA_WITH_AES_128_CBC_SHA', ]
230230
#
231231
# $ruby_load_paths:: List of ruby paths
232-
# Defaults based on $::puppetversion
233232
#
234233
# $ca_client_whitelist:: The whitelist of client certificates that
235234
# can query the certificate-status endpoint
@@ -248,10 +247,6 @@
248247
# $ca_client_self_delete:: Adds a rule to auth.conf, that allows a client to self delete its own certificate
249248
# Defaults to false
250249
#
251-
# $use_legacy_auth_conf:: Should the puppetserver use the legacy puppet auth.conf?
252-
# Defaults to false (the puppetserver will use its own conf.d/auth.conf)
253-
# Note that Puppetserver 7 has dropped support for this.
254-
#
255250
# $check_for_updates:: Should the puppetserver phone home to check for available updates?
256251
#
257252
# $environment_class_cache_enabled:: Enable environment class cache in conjunction with the use of the
@@ -430,7 +425,6 @@
430425
Integer[0] $max_queued_requests = $puppet::server_max_queued_requests,
431426
Integer[0] $max_retry_delay = $puppet::server_max_retry_delay,
432427
Boolean $multithreaded = $puppet::server_multithreaded,
433-
Boolean $use_legacy_auth_conf = $puppet::server_use_legacy_auth_conf,
434428
Boolean $check_for_updates = $puppet::server_check_for_updates,
435429
Boolean $environment_class_cache_enabled = $puppet::server_environment_class_cache_enabled,
436430
Boolean $allow_header_cert_info = $puppet::server_allow_header_cert_info,
@@ -462,21 +456,7 @@
462456
Optional[Stdlib::Absolutepath] $versioned_code_content = $puppet::server_versioned_code_content,
463457
Array[String[1]] $jolokia_metrics_whitelist = $puppet::server_jolokia_metrics_whitelist,
464458
) {
465-
# For Puppetserver, certain configuration parameters are version specific. We
466-
# assume a particular version here.
467-
if $puppetserver_version {
468-
$real_puppetserver_version = $puppetserver_version
469-
} elsif versioncmp($facts['puppetversion'], '7.0.0') >= 0 {
470-
$real_puppetserver_version = '7.0.0'
471-
} else {
472-
$real_puppetserver_version = '6.15.0'
473-
}
474-
475-
if versioncmp($real_puppetserver_version, '7.0.0') >= 0 {
476-
$cadir = "${puppetserver_dir}/ca"
477-
} else {
478-
$cadir = "${ssl_dir}/ca"
479-
}
459+
$cadir = "${puppetserver_dir}/ca"
480460

481461
if $ca {
482462
$ssl_ca_cert = "${cadir}/ca_crt.pem"
@@ -493,12 +473,6 @@
493473
$ssl_cert = "${ssl_dir}/certs/${certname}.pem"
494474
$ssl_cert_key = "${ssl_dir}/private_keys/${certname}.pem"
495475

496-
if versioncmp($real_puppetserver_version, '7.0.0') >= 0 {
497-
if $use_legacy_auth_conf {
498-
fail('The jruby-puppet.use-legacy-auth-conf setting is removed in Puppetserver 7')
499-
}
500-
}
501-
502476
if $jvm_extra_args {
503477
$real_jvm_extra_args = $jvm_extra_args
504478
} else {

manifests/server/config.pp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,19 +164,6 @@
164164
Exec['puppet_server_config-create_ssl_dir'],
165165
],
166166
}
167-
168-
# In Puppet 7 the cadir was changed from $ssldir/ca to $puppetserver_dir/ca
169-
# This migrates the directory if it was in the old location
170-
# The migration command leaves a symlink in place
171-
if versioncmp($puppet::server::real_puppetserver_version, '7.0') > 0 {
172-
exec { 'migrate Puppetserver cadir':
173-
command => "${puppet::puppetserver_cmd} ca migrate",
174-
creates => $puppet::server::cadir,
175-
onlyif => "test -d '${puppet::server::ssl_dir}/ca' && ! test -L '${puppet::server::ssl_dir}'",
176-
path => $facts['path'],
177-
before => Exec['puppet_server_config-generate_ca_cert'],
178-
}
179-
}
180167
} elsif $puppet::server::ca_crl_sync {
181168
# If not a ca AND sync the crl from the ca server
182169
if $server_facts['servername'] {

manifests/server/puppetserver.pp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,6 @@
113113
Boolean $server_ca_client_self_delete = $puppet::server::ca_client_self_delete,
114114
Array[String] $server_ca_client_whitelist = $puppet::server::ca_client_whitelist,
115115
Array[String] $server_admin_api_whitelist = $puppet::server::admin_api_whitelist,
116-
String[1] $server_puppetserver_version = $puppet::server::real_puppetserver_version,
117-
Boolean $server_use_legacy_auth_conf = $puppet::server::use_legacy_auth_conf,
118116
Boolean $server_check_for_updates = $puppet::server::check_for_updates,
119117
Boolean $server_environment_class_cache_enabled = $puppet::server::environment_class_cache_enabled,
120118
Optional[Boolean] $server_metrics = $puppet::server::puppetserver_metrics,
@@ -149,10 +147,6 @@
149147
) {
150148
include puppet::server
151149

152-
if versioncmp($server_puppetserver_version, '6.15.0') < 0 {
153-
fail('puppetserver <6.15.0 is not supported by this module version')
154-
}
155-
156150
$puppetserver_package = pick($puppet::server::package, 'puppetserver')
157151

158152
$jvm_heap_arr = ["-Xms${jvm_min_heap_size}", "-Xmx${jvm_max_heap_size}"]

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"requirements": [
3636
{
3737
"name": "puppet",
38-
"version_requirement": ">= 6.15.0 < 8.0.0"
38+
"version_requirement": ">= 7.0.0 < 8.0.0"
3939
}
4040
],
4141
"operatingsystem_support": [

spec/acceptance/puppetserver_upgrade_spec.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,12 @@
1717
when 'puppet7'
1818
from_version = '7.0.0'
1919
to_version = '7.2.0'
20-
when 'puppet6'
21-
from_version = '6.7.0'
22-
to_version = '6.7.2'
2320
else
2421
raise 'Unsupported Puppet collection'
2522
end
2623

2724
case fact('osfamily')
2825
when 'Debian'
29-
if ENV['BEAKER_PUPPET_COLLECTION'] == 'puppet6'
30-
# Facter 3 needs lsb-release for the os.distro.codename fact
31-
on default, puppet('resource package lsb-release ensure=installed')
32-
end
3326
from_version_exact = "#{from_version}-1#{fact('os.distro.codename')}"
3427
to_version_exact = "#{to_version}-1#{fact('os.distro.codename')}"
3528
else

0 commit comments

Comments
 (0)