Files
confdroid_jenkins/manifests/params.pp

52 lines
1.8 KiB
ObjectPascal
Raw Normal View History

2025-05-05 17:02:29 +02:00
## jenkins_cd::params.pp
# Module name: jenkins_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class holds all parameters for the jenkins_cd module.
# @param [Array] reqpackages which packages to install
# @param [String] pkg_ensure which packages to install
# @param [String] js_host_fqdn fqdn of the host where Jenkins should run
# @param [Boolean] js_enable_fw whether to enable firewall control
# @param [String] js_fw_rule the prefix for the firewall rule order
# @param [String] js_jenkins_port the port to open for Jenkins
# @param [String] js_source_net the source range to open
# @param [Boolean] js_use_sudo whether to add Jenkins to sudoers list
2025-05-05 17:02:29 +02:00
##############################################################################
class jenkins_cd::params (
2025-05-05 17:07:07 +02:00
Array $reqpackages = ['jenkins','fontconfig'],
2025-05-05 17:02:29 +02:00
String $pkg_ensure = 'latest',
2025-05-05 17:07:07 +02:00
# server fqdn
String $js_host_fqdn = 'jenkins.example.net',
2025-05-05 18:13:28 +02:00
# firewall
Boolean $js_enable_fw = true,
String $js_fw_rule = '50',
2025-05-05 18:58:19 +02:00
String $js_jenkins_port = '8080',
2025-05-05 18:13:28 +02:00
String $js_source_net = '0.0.0.0/0',
# user
Boolean $js_use_sudo = false,
2025-05-05 17:02:29 +02:00
) {
# facts
$fqdn = $facts['networking']['fqdn']
$domain = $facts['networking']['domain']
$os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major']
# yum repo
$js_base_url = 'https://pkg.jenkins.io/redhat-stable/'
2025-05-05 17:31:12 +02:00
$js_key_url = "${js_base_url}/jenkins.io-2023.key"
$js_key_code = 'gpg-pubkey-ef5975ca-6421ce2b'
2025-05-05 17:02:29 +02:00
$js_sudoers_file = '/etc/sudoers.d/jenkins_sudo'
$js_sudoers_erb = 'jenkins_cd/sudoers.erb'
2025-05-05 18:16:46 +02:00
# Service
$js_service = 'jenkins'
2025-05-05 17:02:29 +02:00
# includes must be last
include jenkins_cd::main::config
}