Files
confdroid_jenkins/manifests/params.pp

57 lines
2.2 KiB
ObjectPascal

## confdroid_jenkins::params.pp
# Module name: confdroid_jenkins
# Author: 12ww1160 (12ww1160@confdroid.com)
# @summary Class holds all parameters for the confdroid_jenkins module.
# @param [Array] reqpackages which packages to install
# @param [String] pkg_ensure which packages to install
# @param [String] js_gpg_check whether to enable GPG check for Jenkins packages
# @param [String] js_repo_enabled whether to enable the Jenkins repository
# @param [String] js_host_fqdn fqdn of the host where Jenkins should run
# @param [String] js_base_url the base URL for the Jenkins repository
# @param [String] js_key the filename of the Jenkins GPG key to import
# @param [String] js_key_code the code of the Jenkins GPG key to check
# @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
##############################################################################
class confdroid_jenkins::params (
Array $reqpackages = ['jenkins','fontconfig'],
String $pkg_ensure = 'latest',
String $js_gpg_check = '1',
String $js_repo_enabled = '1',
String $js_base_url = 'https://pkg.jenkins.io/redhat-stable/',
String $js_key = 'jenkins.io-2023.key',
String $js_key_code = 'gpg-pubkey-ef5975ca-6421ce2b',
# server fqdn
String $js_host_fqdn = 'jenkins.example.net',
# firewall
Boolean $js_enable_fw = true,
String $js_fw_rule = '50',
String $js_jenkins_port = '8080',
String $js_source_net = '0.0.0.0/0',
# user
Boolean $js_use_sudo = false,
) {
# facts
$fqdn = $facts['networking']['fqdn']
$domain = $facts['networking']['domain']
$os_name = $facts['os']['name']
$os_release = $facts['os']['release']['major']
$js_sudoers_file = '/etc/sudoers.d/jenkins_sudo'
$js_sudoers_erb = 'confdroid_jenkins/sudoers.erb'
# Service
$js_service = 'jenkins'
# includes must be last
include confdroid_jenkins::main::config
}