Version information
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
Add this module to your Puppetfile:
mod 'genebean-puppetmaster_webhook', '0.3.5'
Learn more about managing modules with a PuppetfileDocumentation
puppetmaster_webhook
Table of Contents
- Description
- Setup
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- 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.
0.3.5
- Darn comma... I missed one in the template for
webhook_cofig.json
last time.
0.3.4
- Fixed Slack notifications for environments
- Added icon url for Slack since it seems to ignore the one defined in Slack itself
0.3.3
- Fixed OS versions in metadata.json
0.3.2
- Fixed metadata.json
- Fixed some issues with README.md
- Updated .travis.yml
- Added build status to README.md
0.3.1
- Turns out that when this runs with RVM it needs its own copy of r10k
0.3.0
- Updated docs including info on Slack
- fixed config file template
0.2.0
- Updated docs
0.1.2
- Fixed version in the metadata file
0.1.1
- Removed unneeded text from the README
0.1.0
- Initial version
Dependencies
- maestrodev-rvm (>= 1.13.1 < 2.0.0)