Skip to content

Commit

Permalink
Revert "(choria-io#229) specifically activate clients and agents"
Browse files Browse the repository at this point in the history
This reverts commit 0f1fc43.
  • Loading branch information
ripienaar committed Sep 19, 2019
1 parent 6d27acc commit 256de6b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions manifests/module_plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,20 @@
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) {
$activate_config = {"activate_agent" => $activate_agent, "activate_client" => $activate_client}
$merged_conf = $config.deep_merge($client_config).deep_merge($server_config) + $activate_config
$merged_conf = $config.deep_merge($client_config).deep_merge($server_config)
$merged_files = $common_files + $server_files + $client_files
$merged_directories = $common_directories + $server_directories + $client_directories

} elsif ($server) {
$activate_config = {"activate_agent" => $activate_agent, "activate_client" => false}
$merged_conf = $config.deep_merge($server_config) + $activate_config
$merged_conf = $config.deep_merge($server_config)
$merged_files = $common_files + $server_files
$merged_directories = $common_directories + $server_directories

} elsif ($client) {
$activate_config = {"activate_agent" => false, "activate_client" => $activate_client}
$merged_conf = $config.deep_merge($client_config) + $activate_config
$merged_conf = $config.deep_merge($client_config)
$merged_files = $common_files + $client_files
$merged_directories = $common_directories + $client_directories
}
Expand Down

0 comments on commit 256de6b

Please sign in to comment.