Skip to content

Commit

Permalink
Merge pull request #109 from patcadelina/rundeck-config-template
Browse files Browse the repository at this point in the history
(#108) Add support for customizing rundeck-config
  • Loading branch information
igalic committed Oct 20, 2015
2 parents 3895f5a + 2834f18 commit 7301d7e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 12 deletions.
3 changes: 2 additions & 1 deletion manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
$security_config = $rundeck::security_config,
$security_role = $rundeck::security_role,
$acl_policies = $rundeck::acl_policies,
$api_policies = $rundeck::api_policies
$api_policies = $rundeck::api_policies,
$rdeck_config_template = $rundeck::rdeck_config_template,
) inherits rundeck::params {

$framework_config = deep_merge($rundeck::params::framework_config, $rundeck::framework_config)
Expand Down
23 changes: 12 additions & 11 deletions manifests/config/global/rundeck_config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@
# This private class is called from rundeck::config used to manage the rundeck-config properties
#
class rundeck::config::global::rundeck_config(
$rd_loglevel = $rundeck::config::loglevel,
$rdeck_base = $rundeck::config::rdeck_base,
$rss_enabled = $rundeck::config::rss_enabled,
$clustermode_enabled = $rundeck::config::clustermode_enabled,
$grails_server_url = $rundeck::config::grails_server_url,
$properties_dir = $rundeck::config::properties_dir,
$user = $rundeck::config::user,
$group = $rundeck::config::group,
$mail_config = $rundeck::config::mail_config,
$security_config = $rundeck::config::security_config
$rd_loglevel = $rundeck::config::loglevel,
$rdeck_base = $rundeck::config::rdeck_base,
$rss_enabled = $rundeck::config::rss_enabled,
$clustermode_enabled = $rundeck::config::clustermode_enabled,
$grails_server_url = $rundeck::config::grails_server_url,
$properties_dir = $rundeck::config::properties_dir,
$user = $rundeck::config::user,
$group = $rundeck::config::group,
$mail_config = $rundeck::config::mail_config,
$security_config = $rundeck::config::security_config,
$rdeck_config_template = $rundeck::config::rdeck_config_template,
) {

$properties_file = "${properties_dir}/rundeck-config.groovy"
Expand All @@ -31,7 +32,7 @@

file { $properties_file:
ensure => present,
content => template('rundeck/rundeck-config.erb'),
content => template($rdeck_config_template),
owner => $user,
group => $group,
mode => '0640',
Expand Down
1 change: 1 addition & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@
$jvm_args = $rundeck::params::jvm_args,
$java_home = $rundeck::params::java_home,
$rdeck_home = $rundeck::params::rdeck_home,
$rdeck_config_template = $rundeck::params::rdeck_config_template,
) inherits rundeck::params {

#validate_re($package_ensure, '\d+\.\d+\.\d+')
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,6 @@

$web_xml = "${rdeck_base}/exp/webapp/WEB-INF/web.xml"
$security_role = 'user'

$rdeck_config_template = 'rundeck/rundeck-config.erb'
}

0 comments on commit 7301d7e

Please sign in to comment.