From 0f1fc4363e9e1f54bf55dabe82e8f36ce9e5f84c Mon Sep 17 00:00:00 2001 From: "R.I.Pienaar" Date: Sun, 18 Aug 2019 14:15:50 +0200 Subject: [PATCH] (#229) specifically activate clients and agents --- manifests/module_plugin.pp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/manifests/module_plugin.pp b/manifests/module_plugin.pp index e34192c..420881c 100644 --- a/manifests/module_plugin.pp +++ b/manifests/module_plugin.pp @@ -26,20 +26,25 @@ Optional[String] $group = $mcollective::plugin_group, Optional[String] $mode = $mcollective::plugin_mode, Enum["present", "absent"] $ensure = "present" + Boolean $activate_agent = true + Boolean $activate_client = true ) { if $client or $server { if ($server and $client) { - $merged_conf = $config.deep_merge($client_config).deep_merge($server_config) + $activate_config = {"activate_agent" => $activate_agent, "activate_client" => $activate_client} + $merged_conf = $config.deep_merge($client_config).deep_merge($server_config) + $activate_config $merged_files = $common_files + $server_files + $client_files $merged_directories = $common_directories + $server_directories + $client_directories } elsif ($server) { - $merged_conf = $config.deep_merge($server_config) + $activate_config = {"activate_agent" => $activate_agent, "activate_client" => false} + $merged_conf = $config.deep_merge($server_config) + $activate_config $merged_files = $common_files + $server_files $merged_directories = $common_directories + $server_directories } elsif ($client) { - $merged_conf = $config.deep_merge($client_config) + $activate_config = {"activate_agent" => false, "activate_client" => $activate_client} + $merged_conf = $config.deep_merge($client_config) + $activate_config $merged_files = $common_files + $client_files $merged_directories = $common_directories + $client_directories }