From 1d2ff6ac0ae8ad495e5ad954d8dd836574892fd3 Mon Sep 17 00:00:00 2001 From: Andrey Bystrov Date: Mon, 14 Nov 2016 11:25:24 +0300 Subject: [PATCH 1/5] add parameter "identity" to server.cfg --- manifests/init.pp | 1 + templates/server/server.cfg.erb | 3 +++ 2 files changed, 4 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 30083f5..9c875a1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,6 +4,7 @@ # # class mcollective( + String $identity = undef, String $stomp_host = 'localhost', String $stomp_user = 'mcollective', String $stomp_password = 'password', diff --git a/templates/server/server.cfg.erb b/templates/server/server.cfg.erb index 01328a7..570b4db 100644 --- a/templates/server/server.cfg.erb +++ b/templates/server/server.cfg.erb @@ -1,5 +1,8 @@ # Managed by puppet - do not modify +<% if @identity -%> +identity = <%= @identity %> +<% end -%> main_collective = mcollective collectives = mcollective libdir = /opt/puppetlabs/mcollective/plugins:/usr/libexec/mcollective From e49ddd5e3a540aeda9d5f9ace88eec4f2cad3e85 Mon Sep 17 00:00:00 2001 From: Andrey Bystrov Date: Mon, 14 Nov 2016 12:04:09 +0300 Subject: [PATCH 2/5] syntax fix --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 9c875a1..5c52b31 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,7 +4,7 @@ # # class mcollective( - String $identity = undef, + Optional[String] $identity = undef, String $stomp_host = 'localhost', String $stomp_user = 'mcollective', String $stomp_password = 'password', From e2bec0de01072356f9b831c10e53454e10e10cea Mon Sep 17 00:00:00 2001 From: derekNN Date: Thu, 17 Nov 2016 12:04:37 +0400 Subject: [PATCH 3/5] Update init.pp --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 5c52b31..e20e6a3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,7 +4,7 @@ # # class mcollective( - Optional[String] $identity = undef, + Optional[String] $server_identity = undef, String $stomp_host = 'localhost', String $stomp_user = 'mcollective', String $stomp_password = 'password', From f96c81ec7d65b89cefe3bbddd452e84382a9b678 Mon Sep 17 00:00:00 2001 From: derekNN Date: Thu, 17 Nov 2016 12:05:08 +0400 Subject: [PATCH 4/5] Update server.cfg.erb --- templates/server/server.cfg.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/server/server.cfg.erb b/templates/server/server.cfg.erb index 570b4db..09d63f5 100644 --- a/templates/server/server.cfg.erb +++ b/templates/server/server.cfg.erb @@ -1,7 +1,7 @@ # Managed by puppet - do not modify -<% if @identity -%> -identity = <%= @identity %> +<% if @server_identity -%> +identity = <%= @server_identity %> <% end -%> main_collective = mcollective collectives = mcollective From 8f8d50611ce8e8a0661399d61a3a02fc59b84855 Mon Sep 17 00:00:00 2001 From: derekNN Date: Thu, 17 Nov 2016 12:31:48 +0400 Subject: [PATCH 5/5] add parameter "identity" to "server" class --- manifests/server.pp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/manifests/server.pp b/manifests/server.pp index 082f5ac..83b6458 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -4,12 +4,13 @@ # # class mcollective::server ( - $stomp_host = $::mcollective::stomp_host, - $stomp_user = $::mcollective::stomp_user, - $stomp_password = $::mcollective::stomp_password, - $stomp_port = $::mcollective::stomp_port, - $psk = $::mcollective::psk, - $plugin_config = $::mcollective::server_plugin_config, + $server_identity = $mcollective::server_identity, + $stomp_host = $::mcollective::stomp_host, + $stomp_user = $::mcollective::stomp_user, + $stomp_password = $::mcollective::stomp_password, + $stomp_port = $::mcollective::stomp_port, + $psk = $::mcollective::psk, + $plugin_config = $::mcollective::server_plugin_config, ) { file { '/etc/puppetlabs/mcollective/server.cfg':