enable controls for service, files and dirs
This commit is contained in:
@@ -7,6 +7,6 @@ class jenkins_cd::main::config (
|
|||||||
|
|
||||||
) inherits jenkins_cd::params {
|
) inherits jenkins_cd::params {
|
||||||
if $fqdn == $js_host_fqdn {
|
if $fqdn == $js_host_fqdn {
|
||||||
include jenkins_cd::main::install
|
include jenkins_cd::main::service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
manifests/main/dirs.pp
Normal file
12
manifests/main/dirs.pp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
## jenkins_cd::main::dirs.pp
|
||||||
|
# Module name: jenkins_cd
|
||||||
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
|
# @summary Class manages Jenkins dirs
|
||||||
|
##############################################################################
|
||||||
|
class jenkins_cd::main::dirs (
|
||||||
|
|
||||||
|
) inherits jenkins_cd::params {
|
||||||
|
if $fqdn == $js_host_fqdn {
|
||||||
|
require jenkins_cd::main::install
|
||||||
|
}
|
||||||
|
}
|
||||||
12
manifests/main/files.pp
Normal file
12
manifests/main/files.pp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
## jenkins_cd::main::files.pp
|
||||||
|
# Module name: jenkins_cd
|
||||||
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
|
# @summary Class manages Jenkins files
|
||||||
|
##############################################################################
|
||||||
|
class jenkins_cd::main::files (
|
||||||
|
|
||||||
|
) inherits jenkins_cd::params {
|
||||||
|
if $fqdn == $js_host_fqdn {
|
||||||
|
require jenkins_cd::main::dirs
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,10 +6,12 @@
|
|||||||
class jenkins_cd::main::install (
|
class jenkins_cd::main::install (
|
||||||
|
|
||||||
) inherits jenkins_cd::params {
|
) inherits jenkins_cd::params {
|
||||||
require java_cd
|
if $fqdn == $js_host_fqdn {
|
||||||
require jenkins_cd::main::yumrepo
|
require java_cd
|
||||||
|
require jenkins_cd::main::yumrepo
|
||||||
|
|
||||||
package { $reqpackages:
|
package { $reqpackages:
|
||||||
ensure => $pkg_ensure,
|
ensure => $pkg_ensure,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
manifests/main/service.pp
Normal file
12
manifests/main/service.pp
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
## jenkins_cd::main::service.pp
|
||||||
|
# Module name: jenkins_cd
|
||||||
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
|
# @summary Class manages Jenkins service
|
||||||
|
##############################################################################
|
||||||
|
class jenkins_cd::main::service (
|
||||||
|
|
||||||
|
) inherits jenkins_cd::params {
|
||||||
|
if $fqdn == $js_host_fqdn {
|
||||||
|
require jenkins_cd::main::files
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,22 +6,23 @@
|
|||||||
class jenkins_cd::main::yumrepo (
|
class jenkins_cd::main::yumrepo (
|
||||||
|
|
||||||
) inherits jenkins_cd::params {
|
) inherits jenkins_cd::params {
|
||||||
yumrepo { 'jenkins':
|
if $fqdn == $js_host_fqdn {
|
||||||
descr => 'Jenkins-stable',
|
yumrepo { 'jenkins':
|
||||||
baseurl => $js_base_url,
|
descr => 'Jenkins-stable',
|
||||||
gpgcheck => '1',
|
baseurl => $js_base_url,
|
||||||
enabled => '1';
|
gpgcheck => '1',
|
||||||
}
|
enabled => '1';
|
||||||
|
}
|
||||||
|
|
||||||
# import rpm key
|
# import rpm key
|
||||||
|
|
||||||
exec { $js_key_url:
|
exec { $js_key_url:
|
||||||
command => "rpm --import ${js_key_url}",
|
command => "rpm --import ${js_key_url}",
|
||||||
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
path => '/bin:/usr/bin:/sbin:/usr/sbin',
|
||||||
cwd => '/tmp',
|
cwd => '/tmp',
|
||||||
user => 'root',
|
user => 'root',
|
||||||
unless => "rpm -q ${js_key_code} 2>/dev/null",
|
unless => "rpm -q ${js_key_code} 2>/dev/null",
|
||||||
require => Yumrepo['jenkins'],
|
require => Yumrepo['jenkins'],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user