Skip to content

Commit

Permalink
Move (where possible) parameters to init.pp
Browse files Browse the repository at this point in the history
This makes it easier to maintain due to a better readability. It also
makes puppet-strings' default values more useful.
  • Loading branch information
ekohl committed Feb 11, 2022
1 parent b8fa1cd commit 3d43448
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 262 deletions.
206 changes: 103 additions & 103 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -553,177 +553,177 @@
# }
#
class puppet (
String $version = $puppet::params::version,
String $version = 'present',
Stdlib::Absolutepath $dir = $puppet::params::dir,
Stdlib::Absolutepath $codedir = $puppet::params::codedir,
Stdlib::Absolutepath $vardir = $puppet::params::vardir,
Stdlib::Absolutepath $logdir = $puppet::params::logdir,
Stdlib::Absolutepath $rundir = $puppet::params::rundir,
Stdlib::Absolutepath $ssldir = $puppet::params::ssldir,
Stdlib::Absolutepath $sharedir = $puppet::params::sharedir,
Variant[Boolean, Enum['server', 'agent']] $manage_packages = $puppet::params::manage_packages,
Variant[Boolean, Enum['server', 'agent']] $manage_packages = true,
Optional[String] $dir_owner = $puppet::params::dir_owner,
Optional[String] $dir_group = $puppet::params::dir_group,
Optional[String] $package_provider = $puppet::params::package_provider,
Optional[Variant[String,Hash,Array]] $package_install_options = $puppet::params::package_install_options,
Optional[Variant[Stdlib::Absolutepath, Stdlib::HTTPUrl]] $package_source = $puppet::params::package_source,
Stdlib::Port $port = $puppet::params::port,
Boolean $splay = $puppet::params::splay,
Variant[Integer[0],Pattern[/^\d+[smhdy]?$/]] $splaylimit = $puppet::params::splaylimit,
Optional[Variant[String,Hash,Array]] $package_install_options = undef,
Optional[Variant[Stdlib::Absolutepath, Stdlib::HTTPUrl]] $package_source = undef,
Stdlib::Port $port = 8140,
Boolean $splay = false,
Variant[Integer[0],Pattern[/^\d+[smhdy]?$/]] $splaylimit = 1800,
Variant[Boolean, Stdlib::Absolutepath] $autosign = $puppet::params::autosign,
Array[String] $autosign_entries = $puppet::params::autosign_entries,
Stdlib::Filemode $autosign_mode = $puppet::params::autosign_mode,
Optional[String] $autosign_content = $puppet::params::autosign_content,
Optional[String] $autosign_source = $puppet::params::autosign_source,
Variant[Integer[0],Pattern[/^\d+[smhdy]?$/]] $runinterval = $puppet::params::runinterval,
Boolean $usecacheonfailure = $puppet::params::usecacheonfailure,
Enum['cron', 'service', 'systemd.timer', 'none', 'unmanaged'] $runmode = $puppet::params::runmode,
Array[String] $autosign_entries = [],
Stdlib::Filemode $autosign_mode = '0664',
Optional[String] $autosign_content = undef,
Optional[String] $autosign_source = undef,
Variant[Integer[0],Pattern[/^\d+[smhdy]?$/]] $runinterval = 1800,
Boolean $usecacheonfailure = true,
Enum['cron', 'service', 'systemd.timer', 'none', 'unmanaged'] $runmode = 'service',
Optional[Integer[0,23]] $run_hour = undef,
Optional[Integer[0,59]] $run_minute = undef,
Array[Enum['cron', 'service', 'systemd.timer', 'none']] $unavailable_runmodes = $puppet::params::unavailable_runmodes,
Optional[String] $cron_cmd = $puppet::params::cron_cmd,
Optional[String] $systemd_cmd = $puppet::params::systemd_cmd,
Integer[0] $systemd_randomizeddelaysec = $puppet::params::systemd_randomizeddelaysec,
Boolean $agent_noop = $puppet::params::agent_noop,
Boolean $show_diff = $puppet::params::show_diff,
Optional[Stdlib::HTTPUrl] $module_repository = $puppet::params::module_repository,
Optional[Integer[0]] $http_connect_timeout = $puppet::params::http_connect_timeout,
Optional[Integer[0]] $http_read_timeout = $puppet::params::http_read_timeout,
Optional[Variant[String, Boolean]] $ca_server = $puppet::params::ca_server,
Optional[Stdlib::Port] $ca_port = $puppet::params::ca_port,
Optional[String] $ca_crl_filepath = $puppet::params::ca_crl_filepath,
Optional[String] $prerun_command = $puppet::params::prerun_command,
Optional[String] $postrun_command = $puppet::params::postrun_command,
Array[String] $dns_alt_names = $puppet::params::dns_alt_names,
Boolean $use_srv_records = $puppet::params::use_srv_records,
Optional[String] $cron_cmd = undef,
Optional[String] $systemd_cmd = undef,
Integer[0] $systemd_randomizeddelaysec = 0,
Boolean $agent_noop = false,
Boolean $show_diff = false,
Optional[Stdlib::HTTPUrl] $module_repository = undef,
Optional[Integer[0]] $http_connect_timeout = undef,
Optional[Integer[0]] $http_read_timeout = undef,
Optional[Variant[String, Boolean]] $ca_server = undef,
Optional[Stdlib::Port] $ca_port = undef,
Optional[String] $ca_crl_filepath = undef,
Optional[String] $prerun_command = undef,
Optional[String] $postrun_command = undef,
Array[String] $dns_alt_names = [],
Boolean $use_srv_records = false,
Optional[String] $srv_domain = $puppet::params::srv_domain,
Optional[String] $pluginsource = $puppet::params::pluginsource,
Optional[String] $pluginfactsource = $puppet::params::pluginfactsource,
Hash[String, Data] $additional_settings = $puppet::params::additional_settings,
Hash[String, Data] $agent_additional_settings = $puppet::params::agent_additional_settings,
Optional[String] $pluginsource = undef,
Optional[String] $pluginfactsource = undef,
Hash[String, Data] $additional_settings = {},
Hash[String, Data] $agent_additional_settings = {},
Optional[String] $agent_restart_command = $puppet::params::agent_restart_command,
Optional[String] $classfile = $puppet::params::classfile,
String $hiera_config = $puppet::params::hiera_config,
String $auth_template = $puppet::params::auth_template,
Boolean $allow_any_crl_auth = $puppet::params::allow_any_crl_auth,
Array[String] $auth_allowed = $puppet::params::auth_allowed,
Optional[String] $classfile = undef,
String $hiera_config = '$confdir/hiera.yaml',
String $auth_template = 'puppet/auth.conf.erb',
Boolean $allow_any_crl_auth = false,
Array[String] $auth_allowed = ['$1'],
Variant[String, Array[String]] $client_package = $puppet::params::client_package,
Boolean $agent = $puppet::params::agent,
Boolean $report = $puppet::params::report,
Boolean $agent = true,
Boolean $report = true,
Variant[String, Boolean] $client_certname = $puppet::params::client_certname,
Optional[String] $puppetmaster = $puppet::params::puppetmaster,
String $systemd_unit_name = $puppet::params::systemd_unit_name,
String $systemd_unit_name = 'puppet-run',
String $service_name = $puppet::params::service_name,
Optional[String] $syslogfacility = $puppet::params::syslogfacility,
Optional[String] $syslogfacility = undef,
String $environment = $puppet::params::environment,
Boolean $server = $puppet::params::server,
Array[String] $server_admin_api_whitelist = $puppet::params::server_admin_api_whitelist,
Boolean $server_manage_user = $puppet::params::manage_user,
Boolean $server_manage_user = true,
String $server_user = $puppet::params::server_user,
String $server_group = $puppet::params::server_group,
String $server_dir = $puppet::params::dir,
String $server_ip = $puppet::params::ip,
Stdlib::Port $server_port = $puppet::params::port,
String $server_ip = '0.0.0.0',
Stdlib::Port $server_port = 8140,
Boolean $server_ca = $puppet::params::server_ca,
Boolean $server_ca_crl_sync = $puppet::params::server_ca_crl_sync,
Optional[Boolean] $server_crl_enable = $puppet::params::server_crl_enable,
Boolean $server_ca_auth_required = $puppet::params::server_ca_auth_required,
Boolean $server_ca_client_self_delete = $puppet::params::server_ca_client_self_delete,
Optional[Boolean] $server_crl_enable = undef,
Boolean $server_ca_auth_required = true,
Boolean $server_ca_client_self_delete = false,
Array[String] $server_ca_client_whitelist = $puppet::params::server_ca_client_whitelist,
Optional[Puppet::Custom_trusted_oid_mapping] $server_custom_trusted_oid_mapping = $puppet::params::server_custom_trusted_oid_mapping,
Optional[Puppet::Custom_trusted_oid_mapping] $server_custom_trusted_oid_mapping = undef,
Boolean $server_http = $puppet::params::server_http,
Integer $server_http_port = $puppet::params::server_http_port,
String $server_reports = $puppet::params::server_reports,
Optional[Stdlib::Absolutepath] $server_puppetserver_dir = $puppet::params::server_puppetserver_dir,
Optional[Stdlib::Absolutepath] $server_puppetserver_vardir = $puppet::params::server_puppetserver_vardir,
Optional[Stdlib::Absolutepath] $server_puppetserver_rundir = $puppet::params::server_puppetserver_rundir,
Optional[Stdlib::Absolutepath] $server_puppetserver_logdir = $puppet::params::server_puppetserver_logdir,
Optional[Pattern[/^[\d]\.[\d]+\.[\d]+$/]] $server_puppetserver_version = $puppet::params::server_puppetserver_version,
Optional[Pattern[/^[\d]\.[\d]+\.[\d]+$/]] $server_puppetserver_version = undef,
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,
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,
Stdlib::Absolutepath $server_default_manifest_path = $puppet::params::server_default_manifest_path,
String $server_default_manifest_content = $puppet::params::server_default_manifest_content,
Integer[0] $server_connect_timeout = 120000,
Boolean $server_git_repo = false,
Boolean $server_default_manifest = false,
Stdlib::Absolutepath $server_default_manifest_path = '/etc/puppet/manifests/default_manifest.pp',
String $server_default_manifest_content = '', # lint:ignore:empty_string_assignment
String $server_environments_owner = $puppet::params::server_environments_owner,
Optional[String] $server_environments_group = $puppet::params::server_environments_group,
Stdlib::Filemode $server_environments_mode = $puppet::params::server_environments_mode,
Stdlib::Filemode $server_environments_mode = '0755',
Array[Stdlib::Absolutepath, 1] $server_envs_dir = $puppet::params::server_envs_dir,
Optional[Stdlib::Absolutepath] $server_envs_target = $puppet::params::server_envs_target,
Optional[Stdlib::Absolutepath] $server_envs_target = undef,
Variant[Undef, String[0], Array[Stdlib::Absolutepath]] $server_common_modules_path = $puppet::params::server_common_modules_path,
Stdlib::Filemode $server_git_repo_mode = $puppet::params::server_git_repo_mode,
Stdlib::Filemode $server_git_repo_mode = '0755',
Stdlib::Absolutepath $server_git_repo_path = $puppet::params::server_git_repo_path,
String $server_git_repo_group = $puppet::params::server_git_repo_group,
String $server_git_repo_user = $puppet::params::server_git_repo_user,
Hash[String, String] $server_git_branch_map = $puppet::params::server_git_branch_map,
Integer[0] $server_idle_timeout = $puppet::params::server_idle_timeout,
String $server_post_hook_content = $puppet::params::server_post_hook_content,
String $server_post_hook_name = $puppet::params::server_post_hook_name,
Boolean $server_storeconfigs = $puppet::params::server_storeconfigs,
Hash[String, String] $server_git_branch_map = {},
Integer[0] $server_idle_timeout = 1200000,
String $server_post_hook_content = 'puppet/server/post-receive.erb',
String $server_post_hook_name = 'post-receive',
Boolean $server_storeconfigs = false,
Array[Stdlib::Absolutepath] $server_ruby_load_paths = $puppet::params::server_ruby_load_paths,
Stdlib::Absolutepath $server_ssl_dir = $puppet::params::server_ssl_dir,
Boolean $server_ssl_dir_manage = $puppet::params::server_ssl_dir_manage,
Boolean $server_ssl_key_manage = $puppet::params::server_ssl_key_manage,
Array[String] $server_ssl_protocols = $puppet::params::server_ssl_protocols,
Optional[Stdlib::Absolutepath] $server_ssl_chain_filepath = $puppet::params::server_ssl_chain_filepath,
Boolean $server_ssl_dir_manage = true,
Boolean $server_ssl_key_manage = true,
Array[String] $server_ssl_protocols = ['TLSv1.2'],
Optional[Stdlib::Absolutepath] $server_ssl_chain_filepath = undef,
Optional[Variant[String, Array[String]]] $server_package = $puppet::params::server_package,
Optional[String] $server_version = $puppet::params::server_version,
Optional[String] $server_version = undef,
String $server_certname = $puppet::params::server_certname,
Integer[0] $server_request_timeout = $puppet::params::server_request_timeout,
Boolean $server_strict_variables = $puppet::params::server_strict_variables,
Hash[String, Data] $server_additional_settings = $puppet::params::server_additional_settings,
Boolean $server_foreman = $puppet::params::server_foreman,
Hash[String, Data] $server_additional_settings = {},
Boolean $server_foreman = true,
Stdlib::HTTPUrl $server_foreman_url = $puppet::params::server_foreman_url,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_ca = $puppet::params::server_foreman_ssl_ca,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_cert = $puppet::params::server_foreman_ssl_cert,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_key = $puppet::params::server_foreman_ssl_key,
Boolean $server_foreman_facts = $puppet::params::server_foreman_facts,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_ca = undef,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_cert = undef,
Optional[Stdlib::Absolutepath] $server_foreman_ssl_key = undef,
Boolean $server_foreman_facts = true,
Optional[Stdlib::Absolutepath] $server_puppet_basedir = $puppet::params::server_puppet_basedir,
Enum['current', 'future'] $server_parser = $puppet::params::server_parser,
Variant[Undef, Enum['unlimited'], Pattern[/^\d+[smhdy]?$/]] $server_environment_timeout = $puppet::params::server_environment_timeout,
String $server_jvm_java_bin = $puppet::params::server_jvm_java_bin,
Enum['current', 'future'] $server_parser = 'current',
Variant[Undef, Enum['unlimited'], Pattern[/^\d+[smhdy]?$/]] $server_environment_timeout = undef,
String $server_jvm_java_bin = '/usr/bin/java',
String $server_jvm_config = $puppet::params::server_jvm_config,
Pattern[/^[0-9]+[kKmMgG]$/] $server_jvm_min_heap_size = $puppet::params::server_jvm_min_heap_size,
Pattern[/^[0-9]+[kKmMgG]$/] $server_jvm_max_heap_size = $puppet::params::server_jvm_max_heap_size,
Optional[Variant[String,Array[String]]] $server_jvm_extra_args = $puppet::params::server_jvm_extra_args,
Optional[String] $server_jvm_cli_args = $puppet::params::server_jvm_cli_args,
Optional[Variant[String,Array[String]]] $server_jvm_extra_args = undef,
Optional[String] $server_jvm_cli_args = undef,
Optional[Stdlib::Absolutepath] $server_jruby_gem_home = $puppet::params::server_jruby_gem_home,
Hash[String, String] $server_environment_vars = $puppet::params::server_environment_vars,
Integer[1] $server_max_active_instances = $puppet::params::server_max_active_instances,
Integer[0] $server_max_requests_per_instance = $puppet::params::server_max_requests_per_instance,
Integer[0] $server_max_queued_requests = $puppet::params::server_max_queued_requests,
Integer[0] $server_max_retry_delay = $puppet::params::server_max_retry_delay,
Boolean $server_multithreaded = $puppet::params::server_multithreaded,
Boolean $server_use_legacy_auth_conf = $puppet::params::server_use_legacy_auth_conf,
Boolean $server_check_for_updates = $puppet::params::server_check_for_updates,
Boolean $server_environment_class_cache_enabled = $puppet::params::server_environment_class_cache_enabled,
Boolean $server_allow_header_cert_info = $puppet::params::server_allow_header_cert_info,
Integer[0] $server_web_idle_timeout = $puppet::params::server_web_idle_timeout,
Integer[0] $server_max_requests_per_instance = 0,
Integer[0] $server_max_queued_requests = 0,
Integer[0] $server_max_retry_delay = 1800,
Boolean $server_multithreaded = false,
Boolean $server_use_legacy_auth_conf = false,
Boolean $server_check_for_updates = true,
Boolean $server_environment_class_cache_enabled = false,
Boolean $server_allow_header_cert_info = false,
Integer[0] $server_web_idle_timeout = 30000,
Boolean $server_puppetserver_metrics = false,
Boolean $server_puppetserver_profiler = false,
Boolean $server_metrics_jmx_enable = $puppet::params::server_metrics_jmx_enable,
Boolean $server_metrics_graphite_enable = $puppet::params::server_metrics_graphite_enable,
String $server_metrics_graphite_host = $puppet::params::server_metrics_graphite_host,
Stdlib::Port $server_metrics_graphite_port = $puppet::params::server_metrics_graphite_port,
Boolean $server_metrics_jmx_enable = true,
Boolean $server_metrics_graphite_enable = false,
String $server_metrics_graphite_host = '127.0.0.1',
Stdlib::Port $server_metrics_graphite_port = 2003,
String $server_metrics_server_id = $puppet::params::server_metrics_server_id,
Integer $server_metrics_graphite_interval = $puppet::params::server_metrics_graphite_interval,
Optional[Array] $server_metrics_allowed = $puppet::params::server_metrics_allowed,
Boolean $server_puppetserver_experimental = $puppet::params::server_puppetserver_experimental,
Optional[String[1]] $server_puppetserver_auth_template = $puppet::params::server_puppetserver_auth_template,
Array[String] $server_puppetserver_trusted_agents = $puppet::params::server_puppetserver_trusted_agents,
Array[Hash] $server_puppetserver_trusted_certificate_extensions = $puppet::params::server_puppetserver_trusted_certificate_extensions,
Optional[Enum['off', 'jit', 'force']] $server_compile_mode = $puppet::params::server_compile_mode,
Integer $server_metrics_graphite_interval = 5,
Optional[Array] $server_metrics_allowed = undef,
Boolean $server_puppetserver_experimental = true,
Optional[String[1]] $server_puppetserver_auth_template = undef,
Array[String] $server_puppetserver_trusted_agents = [],
Array[Hash] $server_puppetserver_trusted_certificate_extensions = [],
Optional[Enum['off', 'jit', 'force']] $server_compile_mode = undef,
Optional[Integer[1]] $server_acceptor_threads = undef,
Optional[Integer[1]] $server_selector_threads = undef,
Optional[Integer[1]] $server_ssl_acceptor_threads = undef,
Optional[Integer[1]] $server_ssl_selector_threads = undef,
Optional[Integer[1]] $server_max_threads = undef,
Boolean $server_ca_allow_sans = $puppet::params::server_ca_allow_sans,
Boolean $server_ca_allow_auth_extensions = $puppet::params::server_ca_allow_auth_extensions,
Boolean $server_ca_enable_infra_crl = $puppet::params::server_ca_enable_infra_crl,
Optional[Integer[1]] $server_max_open_files = $puppet::params::server_max_open_files,
Boolean $server_ca_allow_sans = false,
Boolean $server_ca_allow_auth_extensions = false,
Boolean $server_ca_enable_infra_crl = false,
Optional[Integer[1]] $server_max_open_files = undef,
Optional[Stdlib::Absolutepath] $server_versioned_code_id = undef,
Optional[Stdlib::Absolutepath] $server_versioned_code_content = undef,
) inherits puppet::params {
Expand Down
Loading

0 comments on commit 3d43448

Please sign in to comment.