Forge Home

swatch

Puppet module for swatch

5,803 downloads

5,705 latest version

5.0 quality score

Version information

  • 0.2.0 (latest)
  • 0.1.0
released Apr 8th 2018
This version is compatible with:
  • Puppet Enterprise 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 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
  • , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'bryana-swatch', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add bryana-swatch
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install bryana-swatch --version 0.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

bryana/swatch — version 0.2.0 Apr 8th 2018

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.