puppetwebhook
Version information
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, 2016.4.x
- Puppet >= 4.10 < 7.0.0
- , , , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-puppetwebhook', '1.2.0'
Learn more about managing modules with a PuppetfileDocumentation
puppetwebhook
Puppet module for installing and managing Vox Pupuli's puppet_webhook
API Server.
Table of Contents
- Description
- Setup - The basics of getting started with puppetwebhook
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
puppet-puppetwebhook will install the puppet_webhook
gem, configure the gem, and create a SystemD service file and start said service.
Setup
The Module manages the following:
- puppet_webhook API server Ruby gem
- puppet_webhook configuration
- puppet_webhook service
Usage
This module provides one public class puppetwebhook
.
include puppetwebhook
With all default parameter values, this installs, enables, and starts the
puppet_webhook
service. The package provider, user/group that owns the process
and files, and the configuration options themselves.
Install puppet_webhook
as a general ruby gem instead of in the Puppet ruby environment
class { 'puppetwebhook':
pkg_provider => 'gem',
}
Limitations
Currently does not support the following:
- Installation of RPM or DEB packages (planned)
- Enable/Disable Service management (planned)
- Enable/Disable Package management (planned)
- Expects SystemD, no SysVInit or Upstart service is created.
Development
Please see the CONTRIBUTING.md file for instructions regarding development environments and testing.
Authors
- Vox Pupuli: voxpupuli@groups.io
Reference
Table of Contents
Classes
Public Classes
puppetwebhook
: Manage the installation and configuration of the puppet_webhook gem
Private Classes
puppetwebhook::config
: Configures puppet_webhook API server.puppetwebhook::install
: Installs the puppetwebhook gempuppetwebhook::service
: Manage the webhook service
Classes
puppetwebhook
The Puppet Webhook module will install and configure the Sinatra-based web application that serves up a REST API for executing Puppet-related tasks.
Examples
include puppetwebhook
Specify parameters
class { 'puppetwebhook':
pkg_provider => 'gem',
server_cfg => {
server_type => 'daemon',
host => '0.0.0.0',
logfile => '/etc/puppet_webhook/webhook.log',
},
}
Specify Parameters using hiera
puppetwebhook::pkg_provider: 'puppet_gem'
puppetwebhook::server_cfg:
server_type: 'simple'
host: '192.168.100.5'
loglevel: 'WARN'
Parameters
The following parameters are available in the puppetwebhook
class.
pkg_provider
Data type: Enum['gem', 'puppet_gem']
Which provider to install puppetwebhook into
pkg_version
Data type: String
Install a specific version of the puppet_webhook
server_cfg
Data type: Puppetwebhook::Serverconfig
Hash of Server configuration options
Options:
- :server_type
Enum['simple', 'daemon']
: Run the API server as a daemon or not - :host
Stdlib::IP::Address
: IP address to the API server will listen on. - :logfile
Stdlib::Absolutepath
: Path to log file. - :loglevel
Enum['WARN', 'INFO', 'DEBUG', 'ERROR']
: Log level of the server. - :pidfile
Stdlib::Absolutepath
: Path to the PID file. - :port
Stdlib::Port
: Port the API server will listen on. - :enable_ssl
Boolean
: Enable SSL or not. - :ssl_verify
Boolean
: Verify SSL certificate or not. Optional. - :ssl_cert
Stdlib::Absolutepath
: Path to the SSL cert. Optional. - :ssl_key
Stdlib::Absolutepath
: Path to the SSL Private key. Optional.
app_cfg
Data type: Puppetwebhook::Appconfig
Hash of application configuration options
Options:
- :protected
Boolean
: Run API server in protected mode. - :user
String[1]
: API server auth user. - :pass
String[1]
: API server auth password. - :client_cfg
Stdlib::Absolutepath
: MCollective client config. Optional. - :client_timeout
String[1]
: MCollective client timeout. Optional. - :use_mco_ruby
Boolean
: Use MCollective ruby client. Optional. - :use_mcollective
Boolean
: Whether to use MCollective or not. - :discovery_timeout
String[1]
: MCollective discovery timeout. Optional. - :chatops
Boolean
: Integrate a ChatOps tool or not. Default: false. - :chatops_service
Enum['slack', 'rocketchat']
: Which chatops to use. Optional. - :chatops_channel
Pattern[/\A#**/]
: Channel to post to. Optional. - :chatops_user
String[1]
: User to post as. Optional. - :chatops_url
Stdlib::HTTLUrl
: URL to post chatops messages to. Optional. - :default_branch
String[1]
: Default R10K branch to use. Default: production - :ignore_environments
Array[String[1]]
: R10K Environment to ignore. Optional. - :prefix_command
String[1]
: Command that will generate an R10K prefix. Optional. - :r10k_deploy_arguments
String[1]
: Arguments to pass to R10K. - :allow_uppercase
Boolean
: Allow uppercase characters. Optional. - :command_prefix
String[1]
: Command to execute before R10K. For exampleumask 0022;
. Optional. - :prefix
String[1]
: R10K prefix. Optional. - :github_secret
String[1]
: Used to verify the signature on a repo. Currently only supported for Github repos. Optional. - :repository_events
Array
: Array of webhook events to ignore. Optional.
binfile
Data type: Stdlib::Absolutepath
Path to the puppet_webhook binary
r10k_path
Data type: Stdlib::Absolutepath
Path to r10k binary folder. Defaults to /opt/puppetlabs/puppet/bin
webhook_user
Data type: String
User to run puppet_webhook as
webhook_group
Data type: String
Group to run puppet_webhook as
envfile_path
Data type: Stdlib::Absolutepath
Changelog
All notable changes to this project will be documented in this file.
v1.2.0 (2019-03-01)
Implemented enhancements:
- Add
pkg\_version
parameter #16 (alexjfisher)
Fixed bugs:
- Default for
command\_prefix
is broken #15 - Remove broken default
command\_prefix
#18 (alexjfisher) - Fix service not restarting on package update #17 (alexjfisher)
Merged pull requests:
- Fix
source
in metadata.json #13 (alexjfisher)
v1.1.0 (2019-01-17)
Fixed bugs:
- Ensure appropriate ENV file exists for setting puppet_webhook service ENV Vars #11 (dhollinger)
Closed issues:
- puppet_webhook does not start #10
v1.0.0 (2018-11-13)
Implemented enhancements:
- Add acceptance tests #8 (dhollinger)
- Fix permissions for the config file/directories and clean up tests #7 (dhollinger)
- initial README commit #6 (dhollinger)
- Add service code #5 (dhollinger)
- Add config class and some basic params. #4 (dhollinger)
- Add data type for puppet_webhook config #3 (dhollinger)
- Create install class and unit tests #2 (dhollinger)
- Add sync yml #1 (dhollinger)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs-stdlib (>= 4.10.0 < 6.0.0)
- camptocamp-systemd (>= 2.0.0 < 3.0.0)