Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move static defaults from params to init #298

Merged
merged 2 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 47 additions & 47 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -118,60 +118,60 @@
class foreman_proxy_content (
String[1] $parent_fqdn = $foreman_proxy_content::params::parent_fqdn,
String $pulp_admin_password = $foreman_proxy_content::params::pulp_admin_password,
Optional[String] $pulp_max_speed = $foreman_proxy_content::params::pulp_max_speed,
Optional[Integer[1]] $pulp_num_workers = $foreman_proxy_content::params::pulp_num_workers,
Optional[String] $pulp_proxy_password = $foreman_proxy_content::params::pulp_proxy_password,
Optional[Stdlib::Port] $pulp_proxy_port = $foreman_proxy_content::params::pulp_proxy_port,
Optional[String] $pulp_proxy_url = $foreman_proxy_content::params::pulp_proxy_url,
Optional[String] $pulp_proxy_username = $foreman_proxy_content::params::pulp_proxy_username,
Optional[Integer[1]] $pulp_puppet_wsgi_processes = $foreman_proxy_content::params::pulp_puppet_wsgi_processes,
Optional[Stdlib::Absolutepath] $pulp_ca_cert = $foreman_proxy_content::params::pulp_ca_cert,
Integer[0] $pulp_worker_timeout = $foreman_proxy_content::params::pulp_worker_timeout,
Optional[String] $pulp_max_speed = undef,
Optional[Integer[1]] $pulp_num_workers = undef,
Optional[String] $pulp_proxy_password = undef,
Optional[Stdlib::Port] $pulp_proxy_port = undef,
Optional[String] $pulp_proxy_url = undef,
Optional[String] $pulp_proxy_username = undef,
Integer[1] $pulp_puppet_wsgi_processes = 1,
Optional[Stdlib::Absolutepath] $pulp_ca_cert = undef,
Integer[0] $pulp_worker_timeout = 60,

Boolean $puppet = $foreman_proxy_content::params::puppet,
Boolean $puppet = true,

Boolean $reverse_proxy = $foreman_proxy_content::params::reverse_proxy,
Stdlib::Port $reverse_proxy_port = $foreman_proxy_content::params::reverse_proxy_port,
Optional[String] $ssl_protocol = $foreman_proxy_content::params::ssl_protocol,
Boolean $reverse_proxy = false,
Stdlib::Port $reverse_proxy_port = 8443,
Optional[String] $ssl_protocol = undef,

Boolean $qpid_router = $foreman_proxy_content::params::qpid_router,
Optional[String] $qpid_router_hub_addr = $foreman_proxy_content::params::qpid_router_hub_addr,
Stdlib::Port $qpid_router_hub_port = $foreman_proxy_content::params::qpid_router_hub_port,
Optional[String] $qpid_router_agent_addr = $foreman_proxy_content::params::qpid_router_agent_addr,
Stdlib::Port $qpid_router_agent_port = $foreman_proxy_content::params::qpid_router_agent_port,
String $qpid_router_broker_addr = $foreman_proxy_content::params::qpid_router_broker_addr,
Stdlib::Port $qpid_router_broker_port = $foreman_proxy_content::params::qpid_router_broker_port,
String $qpid_router_logging_level = $foreman_proxy_content::params::qpid_router_logging_level,
Enum['file', 'syslog'] $qpid_router_logging = $foreman_proxy_content::params::qpid_router_logging,
Stdlib::Absolutepath $qpid_router_logging_path = $foreman_proxy_content::params::qpid_router_logging_path,
Optional[String] $qpid_router_ssl_ciphers = $foreman_proxy_content::params::qpid_router_ssl_ciphers,
Optional[Array[String]] $qpid_router_ssl_protocols = $foreman_proxy_content::params::qpid_router_ssl_protocols,
Optional[String] $qpid_router_sasl_mech = $foreman_proxy_content::params::qpid_router_sasl_mech,
Optional[String] $qpid_router_sasl_username = $foreman_proxy_content::params::qpid_router_sasl_username,
Boolean $qpid_router = true,
Optional[String] $qpid_router_hub_addr = undef,
Stdlib::Port $qpid_router_hub_port = 5646,
Optional[String] $qpid_router_agent_addr = undef,
Stdlib::Port $qpid_router_agent_port = 5647,
String $qpid_router_broker_addr = 'localhost',
Stdlib::Port $qpid_router_broker_port = 5671,
String $qpid_router_logging_level = 'info+',
Enum['file', 'syslog'] $qpid_router_logging = 'syslog',
Stdlib::Absolutepath $qpid_router_logging_path = '/var/log/qdrouterd',
Optional[String] $qpid_router_ssl_ciphers = undef,
Optional[Array[String]] $qpid_router_ssl_protocols = undef,
Optional[String] $qpid_router_sasl_mech = 'PLAIN',
Optional[String] $qpid_router_sasl_username = 'katello_agent',
Optional[String] $qpid_router_sasl_password = $foreman_proxy_content::params::qpid_router_sasl_password,
Boolean $enable_ostree = $foreman_proxy_content::params::enable_ostree,
Boolean $enable_yum = $foreman_proxy_content::params::enable_yum,
Boolean $enable_file = $foreman_proxy_content::params::enable_file,
Boolean $proxy_pulp_deb_to_pulpcore = $foreman_proxy_content::params::proxy_pulp_deb_to_pulpcore,
Boolean $proxy_pulp_isos_to_pulpcore = $foreman_proxy_content::params::proxy_pulp_isos_to_pulpcore,
Boolean $proxy_pulp_yum_to_pulpcore = $foreman_proxy_content::params::proxy_pulp_yum_to_pulpcore,
Boolean $enable_puppet = $foreman_proxy_content::params::enable_puppet,
Boolean $enable_docker = $foreman_proxy_content::params::enable_docker,
Boolean $enable_deb = $foreman_proxy_content::params::enable_deb,
Boolean $enable_ostree = false,
Boolean $enable_yum = true,
Boolean $enable_file = true,
Boolean $proxy_pulp_deb_to_pulpcore = true,
Boolean $proxy_pulp_isos_to_pulpcore = true,
Boolean $proxy_pulp_yum_to_pulpcore = true,
Boolean $enable_puppet = true,
Boolean $enable_docker = true,
Boolean $enable_deb = true,

Boolean $manage_broker = $foreman_proxy_content::params::manage_broker,
Boolean $manage_broker = true,

Boolean $pulpcore_manage_postgresql = $foreman_proxy_content::params::pulpcore_manage_postgresql,
Stdlib::Host $pulpcore_postgresql_host = $foreman_proxy_content::params::pulpcore_postgresql_host,
Stdlib::Port $pulpcore_postgresql_port = $foreman_proxy_content::params::pulpcore_postgresql_port,
String $pulpcore_postgresql_user = $foreman_proxy_content::params::pulpcore_postgresql_user,
Boolean $pulpcore_manage_postgresql = true,
Stdlib::Host $pulpcore_postgresql_host = 'localhost',
Stdlib::Port $pulpcore_postgresql_port = 5432,
String $pulpcore_postgresql_user = 'pulp',
String $pulpcore_postgresql_password = $foreman_proxy_content::params::pulpcore_postgresql_password,
String $pulpcore_postgresql_db_name = $foreman_proxy_content::params::pulpcore_postgresql_db_name,
Boolean $pulpcore_postgresql_ssl = $foreman_proxy_content::params::pulpcore_postgresql_ssl,
Boolean $pulpcore_postgresql_ssl_require = $foreman_proxy_content::params::pulpcore_postgresql_ssl_require,
Stdlib::Absolutepath $pulpcore_postgresql_ssl_cert = $foreman_proxy_content::params::pulpcore_postgresql_ssl_cert,
Stdlib::Absolutepath $pulpcore_postgresql_ssl_key = $foreman_proxy_content::params::pulpcore_postgresql_ssl_key,
Stdlib::Absolutepath $pulpcore_postgresql_ssl_root_ca = $foreman_proxy_content::params::pulpcore_postgresql_ssl_root_ca,
String $pulpcore_postgresql_db_name = 'pulpcore',
Boolean $pulpcore_postgresql_ssl = false,
Boolean $pulpcore_postgresql_ssl_require = true,
Stdlib::Absolutepath $pulpcore_postgresql_ssl_cert = '/etc/pki/katello/certs/pulpcore-database.crt',
Stdlib::Absolutepath $pulpcore_postgresql_ssl_key = '/etc/pki/katello/private/pulpcore-database.key',
Stdlib::Absolutepath $pulpcore_postgresql_ssl_root_ca = '/etc/pki/tls/certs/ca-bundle.crt',
Integer[0] $pulpcore_worker_count = $foreman_proxy_content::params::pulpcore_worker_count,
) inherits foreman_proxy_content::params {
include certs
Expand Down
67 changes: 5 additions & 62 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,69 +1,12 @@
# Default params for foreman_proxy_content settings
class foreman_proxy_content::params {

# when not specified, we expect all in one installation
$parent_fqdn = $facts['networking']['fqdn']

$reverse_proxy = false
$reverse_proxy_port = 8443

$ssl_protocol = undef

$certs_tar = undef
$rhsm_hostname = undef
$rhsm_url = '/rhsm'

$puppet = true

$pulp_admin_password = extlib::cache_data('foreman_cache_data', 'pulp_node_admin_password', extlib::random_password(32))
$pulp_max_speed = undef
$pulp_num_workers = undef
$pulp_proxy_password = undef
$pulp_proxy_port = undef
$pulp_proxy_url = undef
$pulp_proxy_username = undef
$pulp_puppet_wsgi_processes = 1
$pulp_ca_cert = undef
$pulp_worker_timeout = 60

$qpid_router = true
$qpid_router_agent_addr = undef
$qpid_router_agent_port = 5647
$qpid_router_broker_addr = 'localhost'
$qpid_router_broker_port = 5671
$qpid_router_hub_addr = undef
$qpid_router_hub_port = 5646
$qpid_router_logging_level = 'info+'
$qpid_router_logging = 'syslog'
$qpid_router_logging_path = '/var/log/qdrouterd'
$qpid_router_ssl_ciphers = undef
$qpid_router_ssl_protocols = undef
$qpid_router_sasl_mech = 'PLAIN'
$qpid_router_sasl_username = 'katello_agent'
$qpid_router_sasl_password = extlib::cache_data('foreman_cache_data', 'qpid_router_sasl_password', extlib::random_password(16))
$parent_fqdn = $facts['networking']['fqdn']

$enable_ostree = false
$enable_yum = true
$enable_file = true
$proxy_pulp_isos_to_pulpcore = true
$proxy_pulp_yum_to_pulpcore = true
$proxy_pulp_deb_to_pulpcore = true
$enable_puppet = true
$enable_docker = true
$enable_deb = true
$pulp_admin_password = extlib::cache_data('foreman_cache_data', 'pulp_node_admin_password', extlib::random_password(32))

$manage_broker = true
$qpid_router_sasl_password = extlib::cache_data('foreman_cache_data', 'qpid_router_sasl_password', extlib::random_password(16))

$pulpcore_manage_postgresql = true
$pulpcore_postgresql_host = 'localhost'
$pulpcore_postgresql_port = 5432
$pulpcore_postgresql_user = 'pulp'
$pulpcore_postgresql_password = extlib::cache_data('pulpcore_cache_data', 'db_password', extlib::random_password(32))
$pulpcore_postgresql_db_name = 'pulpcore'
$pulpcore_postgresql_ssl = false
$pulpcore_postgresql_ssl_require = true
$pulpcore_postgresql_ssl_cert = '/etc/pki/katello/certs/pulpcore-database.crt'
$pulpcore_postgresql_ssl_key = '/etc/pki/katello/private/pulpcore-database.key'
$pulpcore_postgresql_ssl_root_ca = '/etc/pki/tls/certs/ca-bundle.crt'
$pulpcore_worker_count = min(8, $facts['processors']['count'])
$pulpcore_postgresql_password = extlib::cache_data('pulpcore_cache_data', 'db_password', extlib::random_password(32))
$pulpcore_worker_count = min(8, $facts['processors']['count'])
}