add installation and yumrepo

This commit is contained in:
Arne Teuke
2025-05-05 17:02:29 +02:00
parent 847a48620a
commit 5adca39051
9 changed files with 437 additions and 2 deletions

10
manifests/main/config.pp Normal file
View File

@@ -0,0 +1,10 @@
## jenkins_cd::main::config.pp
# Module name: jenkins_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages the logic for the jenkins_cd module.
##############################################################################
class jenkins_cd::main::config (
) inherits jenkins_cd::params {
include jenkins_cd::main::install
}

15
manifests/main/install.pp Normal file
View File

@@ -0,0 +1,15 @@
## jenkins_cd::main::install.pp
# Module name: jenkins_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages installation details
##############################################################################
class jenkins_cd::main::install (
) inherits jenkins_cd::params {
require java_cd
require jenkins_cd::main::yumrepo
# package { $reqpackages:
# ensure => $pkg_ensure,
# }
}

27
manifests/main/yumrepo.pp Normal file
View File

@@ -0,0 +1,27 @@
## jenkins_cd::main::yumrepo.pp
# Module name: jenkins_cd
# Author: Arne Teuke (arne_teuke@confdroid.com)
# @summary Class manages yum repos for the installation
##############################################################################
class jenkins_cd::main::yumrepo (
) inherits jenkins_cd::params {
yumrepo { 'jenkins':
descr => 'Jenkins-stable',
baseurl => $js_base_url,
gpgcheck => '1',
enabled => '1';
}
# import rpm key
exec { $js_key_url:
command => "rpm --import ${js_key_url}",
path => '/bin:/usr/bin:/sbin:/usr/sbin',
cwd => '/tmp',
user => 'root',
unless => "rpm -q ${js_key_code} 2>/dev/null",
require => Yumrepo['jenkins'],
}
}