Skip to content

Commit

Permalink
Drop config_version and environment.conf
Browse files Browse the repository at this point in the history
Support for dynamic and config environments was dropped in a61e010
however the `config_version` related parameters and the
`environment.conf` template used by these features were not removed
at the same time. This commit drops the unused code.

As parameters are being removed, this will be a breaking change and
require a major version bump.
  • Loading branch information
optiz0r authored and ekohl committed Oct 20, 2021
1 parent 50e1397 commit e360bde
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 40 deletions.
5 changes: 0 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,6 @@
#
# $server_http_port:: Puppet master HTTP port; defaults to 8139.
#
# $server_config_version:: How to determine the configuration version. When
# using git_repo, by default a git describe
# approach will be installed.
#
# $server_foreman_facts:: Should foreman receive facts from puppet
#
# $server_foreman:: Should foreman integration be installed
Expand Down Expand Up @@ -647,7 +643,6 @@
Variant[Undef, String[0], Stdlib::Absolutepath] $server_external_nodes = $puppet::params::server_external_nodes,
Optional[Stdlib::Absolutepath] $server_trusted_external_command = $puppet::params::server_trusted_external_command,
Array[String] $server_cipher_suites = $puppet::params::server_cipher_suites,
Optional[String] $server_config_version = $puppet::params::server_config_version,
Integer[0] $server_connect_timeout = $puppet::params::server_connect_timeout,
Boolean $server_git_repo = $puppet::params::server_git_repo,
Boolean $server_default_manifest = $puppet::params::server_default_manifest,
Expand Down
4 changes: 0 additions & 4 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,6 @@
# Template for server settings in [main]
$server_main_template = 'puppet/server/puppet.conf.main.erb'

# The script that is run to determine the reported manifest version. Undef
# means we determine it in server.pp
$server_config_version = undef

# Set 'false' for static environments, or 'true' for git-based workflow
$server_git_repo = false
# Git branch to puppet env mapping for the post receive hook
Expand Down
15 changes: 0 additions & 15 deletions manifests/server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,6 @@
#
# $codedir:: Override the puppet code directory.
#
# $config_version:: How to determine the configuration version. When
# using git_repo, by default a git describe
# approach will be installed.
#
# $server_foreman_facts:: Should foreman receive facts from puppet
#
# $foreman:: Should foreman integration be installed
Expand Down Expand Up @@ -365,7 +361,6 @@
Variant[Undef, String[0], Stdlib::Absolutepath] $external_nodes = $puppet::server_external_nodes,
Optional[Stdlib::Absolutepath] $trusted_external_command = $puppet::server_trusted_external_command,
Array[String] $cipher_suites = $puppet::server_cipher_suites,
Optional[String] $config_version = $puppet::server_config_version,
Integer[0] $connect_timeout = $puppet::server_connect_timeout,
Integer[0] $web_idle_timeout = $puppet::server_web_idle_timeout,
Boolean $git_repo = $puppet::server_git_repo,
Expand Down Expand Up @@ -486,16 +481,6 @@
$ssl_cert = "${ssl_dir}/certs/${certname}.pem"
$ssl_cert_key = "${ssl_dir}/private_keys/${certname}.pem"

if $config_version == undef {
if $git_repo {
$config_version_cmd = "git --git-dir ${envs_dir}/\$environment/.git describe --all --long"
} else {
$config_version_cmd = undef
}
} else {
$config_version_cmd = $config_version
}

if versioncmp($real_puppetserver_version, '7.0.0') >= 0 {
if $use_legacy_auth_conf {
fail('The jruby-puppet.use-legacy-auth-conf setting is removed in Puppetserver 7')
Expand Down
1 change: 0 additions & 1 deletion spec/classes/puppet_server_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
it { should_not contain_puppet__config__master('environment_timeout') }
it { should_not contain_puppet__config__master('manifest') }
it { should_not contain_puppet__config__master('modulepath') }
it { should_not contain_puppet__config__master('config_version') }
it { should_not contain_puppet__config__master('trusted_external_command') }

it { should contain_puppet__config__master('external_nodes').with_value("#{etcdir}\/node.rb") }
Expand Down
15 changes: 0 additions & 15 deletions templates/server/environment.conf.erb

This file was deleted.

0 comments on commit e360bde

Please sign in to comment.