swatch

Puppet module for swatch
Bryan Andrews

Bryan Andrews

bryana

4,361 downloads

4,302 latest version

5.0 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.0
released Jul 3rd 2019
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, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >=3.8.0 < 2016.4.0
  • Ubuntu
    ,
    Amazon
    ,
    Debian
    ,
    RedHat
    ,
    CentOS

Start using this module

Documentation

bryana/swatch — version 0.2.0 Jul 3rd 2019

Table of Contents

  1. Overview
  2. Setup - The basics of getting started with swatch
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.

Overview

Installs and configures the old swatch utility. Init script included for daemon support.

Setup

What swatch affects

  • /etc/init.d/swatch - init script.
  • /etc/swatch.d/ - config directory.

Setup Requirements

EPEL is needed in CentOS/RHEL for the swatch package. Swatch is a perl script.

Usage

Swatch (Hash) conf example:

class { '::swatch':
  conf => {
    'apacheStartup' => { 
      'filewatch' => '/var/log/httpd/error_log',
      'content'   => "watchfor /Apache.* configured -- resuming normal operations/\n\texec /bin/logger 'apache startup detected'" 
    },
    'sudoRoot' => { 
      'filewatch' => '/var/log/secure',
      'content'   => "watchfor /sudo: (.*) :.* USER=root .*/\n\texec /bin/logger 'sudo to root by \$1'" 
    } 
  }
}

Reference

Classes

Public classes

  • swatch: Installs and configures swatch.

Private classes

  • swatch::params: Auto detection of package names based on OS family.
  • swatch::install: Package installation.
  • swatch::config: Init script and config files.
  • swatch::service: Service management.

Limitations

Linux only support.