task_series
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
- Puppet >= 4.10.0 < 7.0.0
- , , , , , , , , , ,
Tasks:
- test
Plans:
- task_series
- test
Start using this module
Add this module to your Puppetfile:
mod 'reidmv-task_series', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
task_series
Utility plan to intelligently run a series of tasks and report back on the outcome.
Table of Contents
Description
This module provides a Bolt plan which runs a series of tasks on specified targets. After each individual task completes, targets which did not complete that task successfully are set aside, and the next task in the series is run only on those targets on which the task succeeded. At the end, a summary of the series result is presented, along with the ResultSets for each step in the task series.
The summary will show which targets succeeded, as well as which targets failed and at which step.
Usage
Example usage:
plan task_series::test (
TargetSpec $nodes = ['ssh://faketarget', 'local://willfailtest', 'local://1', 'local://2'],
) {
$targets = get_targets($nodes)
$series_result = run_plan('task_series',
nodes => $targets,
tasks => [
[ 'task_series::test',
exit_code => 0,
],
[ 'task_series::test',
exit_code => 0,
],
[ 'task_series::test',
exit_code => 0,
],
],
)
return($series_result[summary])
}
Example return value:
{
"errored at step 0: validate connection": [
"ssh://faketarget"
],
"errored at step 1: task_series::test": [
"local://willfailtest"
],
"succeeded": [
"local://1",
"local://2",
"local://3"
]
}
What are tasks?
Modules can contain tasks that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.
Tasks in this module release
What are plans?
Modules can contain plans that take action outside of a desired state managed by Puppet. It’s perfect for troubleshooting or deploying one-off changes, distributing scripts to run across your infrastructure, or automating changes that need to happen in a particular order as part of an application deployment.