taskplan

pdk
tasks
Run Puppet task plans, using Bolt, via a task

reidmv

reidmv

5,317 downloads

2,969 latest version

5.0 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.2
  • 0.1.1
  • 0.1.0
released Jun 11th 2019
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Debian
    ,
    Ubuntu
    ,
    Fedora
    ,
    SLES
Tasks:
  • taskplan
Plans:
  • test

Start using this module

Tags: task, plan, bolt

Documentation

reidmv/taskplan — version 0.2.0 Jun 11th 2019

taskplan

Description

This module provides a task for running Puppet task plans by invoking Bolt on the target system.

This can be useful because it provides a shim into invoking task plans programatically via an API, since tasks can be invoked via an API. Therefore, if we have a task that can invoke a plan, we have a means of invoking a plan via the Puppet orchestrator API.

Example Usage

bolt task run taskplan \
  --modulepath /example/modules \
  --nodes local://localhost \
  --params '{"plan":"taskplan::test","params":{"message":"Hello"},"arguments":{"modulepath":"/example/modules"}}'

Plan-specific tailored taskplan task

To create a plan-specific tailored taskplan task, use something like the following:

#!/opt/puppetlabs/puppet/bin/ruby
require 'json'

$params = {
  'params'    => JSON.parse(STDIN.read),
  'plan'      => 'example::myplan',
  'arguments' => [],
}

taskplanrb = File.join($params['params']['_installdir'], 'util', 'files', 'taskplan.rb')

load(taskplanrb)