Puppet Plan: choria::tasks::download_files

Defined in:
plans/tasks/download_files.pp

Overview

Download the files of associated with a task onto the nodes

Parameters:

  • nodes (Choria::Nodes)

    The nodes to download onto

  • files (Array[Hash])

    The files section of the task metadata

  • task (String)

    The name of the task

Returns:

  • (Choria::TaskResults)


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'plans/tasks/download_files.pp', line 7

plan choria::tasks::download_files(
  String $task,
  Array[Hash] $files,
  Choria::Nodes $nodes
) {
  info("Downloading files for task '${task}' onto ${nodes.size} nodes")

  choria::task(
    "nodes"            => $nodes,
    "action"           => "bolt_tasks.download",
    "batch_size"       => 50,
    "batch_sleep_time" => 1,
    "silent"           => true,
    "properties"       => {
      "environment"    => "production",
      "task"           => $task,
      "files"          => $files.to_json
    }
  )
}