Sha256: 6c9e8a65e4f6536afa06d9985c22fb77f5b7360d0786f7eb22faebb086aa1491
Contents?: true
Size: 824 Bytes
Versions: 54
Compression:
Stored size: 824 Bytes
Contents
plan aggregate::nodes( Optional[String[0]] $task = undef, Optional[String[0]] $command = undef, Optional[String[0]] $script = undef, TargetSpec $nodes, Hash[String, Data] $params = {} ) { # Validation $type_count = [$task, $command, $script].reduce(0) |$acc, $v| { if ($v) { $acc + 1 } else { $acc } } if ($type_count == 0) { fail_plan("Must specify a command, script, or task to run", 'aggregate/invalid-params') } if ($type_count > 1) { fail_plan("Must specify only one command, script, or task to run", 'aggregate/invalid-params') } $res = if ($task) { run_task($task, $nodes, $params) } elsif ($command) { run_command($command, $nodes, $params) } elsif ($script) { run_script($script, $nodes, $params) } return aggregate::nodes($res) }
Version data entries
54 entries across 54 versions & 1 rubygems