Git Product home page Git Product logo

pe_support_kb_task_templates's Introduction

Puppet Enterprise Support Knowledge Base Task Template

Table of Contents

  1. Description - What the module does and why it is useful
  2. Setup - Getting started with this module
  3. Usage - Example output from the task
  4. Limitations - What you need to do

Description

This repository contains a Puppet Task template for use by Support Engineers when writing tasks for Knowledge Base articles.

Setup

  1. Install or upgrade PDK, if necessary: https://puppet.com/docs/pdk/latest/pdk_install.html
  2. Create a module: https://puppet.com/docs/pdk/latest/pdk_creating_modules.html
  3. Copy the tasks directory from this template to your module
  4. Rename the copied tasks/* to match the name of your task
  5. Write your task: https://puppet.com/docs/puppet/latest/puppet_tasks.html

Usage

If you were to install this module on a master ...

[root@pe-master ~]# git clone https://github.com/puppetlabs/pe_support_kb_task.git /etc/puppetlabs/code/environments/production/modules/pe_support_kb_task
puppet agent -t

Its task would appear in the list of available tasks ...

[root@pe-master ~]# puppet task show
pe_support_kb_task::template

You could run that task, which simply echoes its defaults ...

[root@pe-master ~]#  puppet task run pe_support_kb_task::template --nodes pe-master
Starting job ...
New job ID: 1
Nodes: 1

Started on pe-master ...
Finished on node pe-master
  status : success
  results : example_optional_integer 123 example_optional_string ABC

Job completed. 1/1 nodes succeeded.
Duration: 2 sec

And you could run that task with parameters, which simply echoes its parameters ...

[root@pe-master tasks]# puppet task run pe_support_kb_task::template --nodes pe-master example_optional_integer=789 example_optional_string=XYZ example_optional_boolean=true
Starting job ...
New job ID: 2
Nodes: 1

Started on pe-master ...
Finished on node pe-master
  status : success
  results : example_optional_integer 780 example_optional_string XYZ example_optional_boolean true

Job completed. 1/1 nodes succeeded.
Duration: 2 sec

Limitations

This is a template, with a library of useful methods.

You actually have to name and write your own task :)

pe_support_kb_task_templates's People

Contributors

kamiolszewski avatar m0dular avatar tkishel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.