From 001d4fc60e3805c9cc74f6e1dc4bd54c28fe9c7b Mon Sep 17 00:00:00 2001 From: Patrick Cadelina Date: Tue, 16 Jun 2015 16:48:53 +0800 Subject: [PATCH] Add support for customizing rundeck-config --- manifests/config.pp | 3 ++- manifests/config/global/rundeck_config.pp | 23 ++++++++++++----------- manifests/init.pp | 1 + manifests/params.pp | 2 ++ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 315ccb4cb..a09736550 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -30,7 +30,8 @@ $mail_config = $rundeck::mail_config, $security_config = $rundeck::security_config, $acl_policies = $rundeck::acl_policies, - $api_policies = $rundeck::api_policies + $api_policies = $rundeck::api_policies, + $rdeck_config_template = $rundeck::rdeck_template, ) inherits rundeck::params { $framework_config = deep_merge($rundeck::params::framework_config, $rundeck::framework_config) diff --git a/manifests/config/global/rundeck_config.pp b/manifests/config/global/rundeck_config.pp index e3504f78b..8825402df 100644 --- a/manifests/config/global/rundeck_config.pp +++ b/manifests/config/global/rundeck_config.pp @@ -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" @@ -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', diff --git a/manifests/init.pp b/manifests/init.pp index a64a365ce..da7982ef1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -135,6 +135,7 @@ $group = $rundeck::params::group, $jvm_args = $rundeck::params::jvm_args, $rdeck_home = $rundeck::params::rdeck_home, + $rdeck_config_template = $rundeck::params::rdeck_config_template, ) inherits rundeck::params { #validate_re($package_ensure, '\d+\.\d+\.\d+') diff --git a/manifests/params.pp b/manifests/params.pp index 21b7d527b..079701e50 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -273,4 +273,6 @@ $ssl_port = '4443' $package_source = 'https://dl.bintray.com/rundeck/rundeck-deb' + + $rdeck_config_template = 'rundeck/rundeck-config.erb' }