/ipcrm-echo

Puppet Module echo: print messages to report without logging change

Primary LanguageRubyApache License 2.0Apache-2.0

Build Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Usage - Configuration options and additional functionality
  4. Known Issues

Overview

The purpose of the module is really to add the echo type. This type allows you to print a message to your report WITHOUT logging a change.

Module Description

You would use this module to print messages to your reports that will only issue a notice and does not get flagged as a change.

Usage

Usage is super basic and follows that of the notify type. You can use echo with the message parameter and it will print the value of message, or if omitted it will just print the title.

echo {'TestMessage':
  message => 'Test message'
}

The expected output looks like this:

Notice: /Echo[TestMessage]/message: Test message

You can optionally provide the withpath parameter to control whether or not the resource path is displayed:

echo {'TestMessageNoPath':
  message  => 'Test message',
  withpath => false
}

The expected output looks like this:

Notice: Test message

Optionally; you can control the loglevel facility the message is printed with:

echo {'TestMessageNoPath':
  message  => 'Test message',
  loglevel => 'err',
}

The expected output looks like this:

Error: /Echo[TestMessage]/message: Test message

You als might want to show the message only during a puppet schedule. This in coordination with a resource change you have put on this schedule.

schedule { 'maintenance':
  range  => '2 - 4',
  period => daily,
  repeat => 1,
}

echo {'This will only show in the maintenace window':
  message  => 'Test message',
  schedule => 'maintenance',
}