Forge Home

puppetmaster_webhook

A webhook for triggering r10k

9,864 downloads

7,893 latest version

4.3 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.3.5 (latest)
  • 0.3.4 (deleted)
  • 0.3.3
  • 0.3.2 (deleted)
  • 0.3.1
  • 0.3.0
  • 0.2.0
  • 0.1.2
  • 0.1.0
released Mar 16th 2017
This version is compatible with:
  • Puppet Enterprise 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 3.0.0 < 5.0.0
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'genebean-puppetmaster_webhook', '0.3.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add genebean-puppetmaster_webhook
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install genebean-puppetmaster_webhook --version 0.3.5

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

genebean/puppetmaster_webhook — version 0.3.5 Mar 16th 2017

Build Status Puppet Forge GitHub tag

puppetmaster_webhook

Table of Contents

  1. Description
  2. Setup
  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.
  6. Development - Guide for contributing to the module

Description

This module installs and configures a Sinatra based webhook receiver designed to trigger r10k. If you choose, you can also have messages from this receiver sent to a Slack channel.

Setup

What puppetmaster_webhook affects

By default this module will install RVM system-wide and uses it to install Ruby 2.2.6.

Beginning with puppetmaster_webhook

By simply including this module you will end up with a webhook receiver listening on all interfaces on port 8081. It assumes that you are using a control repo named control-repo.

Usage

# Use the defaults:
incldue ::puppetmaster_webhook
class { '::puppetmaster_webhook':
  webhook_port => '8888',
  repo_control => 'control-repo',
  slack_url    => 'https://hooks.slack.com/services/YOUR-URL/GOES-HERE',
}

Reference

manage_ruby
If true this module will install RVM and use it to install Ruby 2.2.6. This does not interfere with Puppet's ruby or the system ruby.
Defaults to true

r10_cmd
The full path to r10k
Defaults to /usr/local/rvm/wrappers/ruby-2.2.6/bundle exec r10k if manage_ruby is true
Defaults to /usr/bin/r10k if manage_ruby is false

repo_control
The name of the control repo
Defaults to control-repo

repo_hieradata
The name of the repository where the 'hieradata' is stored.

repo_puppetfile
The name of the repository where the 'Puppetfile' is stored.

slack_icon The url to the icon you want to use for notifications in Slack

slack_url The url provided during the setup of a custom webhook in Slack

webhook_bind
On which address should the webhook bind
Defaults to 0.0.0.0

webhook_group
The group of this service/script
Defaults to 8081

webhook_home
This is the directory where all stuff of this webhook is installed
Defaults to /opt/webhook

webhook_owner
The owner of this service/script
Defaults to root

webhook_port
On which port should the webhook listen
Defaults to root

Limitations

This module has been tested on CentOS 7 and should work fine on anything in the Red Hat family that uses systemd. In theory it should work on other distributions that also use systemd but testing has not been done.

Development

Pull requests are welcome. Testing is done against CentOS 7 using Puppet 4. A Vagrantfile is included to aide in testing and development.