Introducing tasks and plans
Tasks and plans are more forms of scripts and allow users to manage parameters, logic, and flow between actions. Unlike normal Puppet code, plans and tasks run through the script in sequential order, even for Puppet plans that compile a catalog.
Creating tasks
Tasks are single-action scripts that can be in any language that will run on a target machine. The key differences between the normal scripts we have run with Bolt previously and a task are as follows:
- Tasks are paired with a JSON file to provide metadata such as parameters, which allow them to be shared and reused more easily
- Tasks can handle structure/typed input and output
- Tasks can handle multiple implementations to make them cross-platform
They can be stored in the task directory of a Bolt project or the task directory in a Puppet module. Task implementations should contain their extension in the name. The name can include digits, underscores, and upper and lowercase...