Puppet Class: r10k::webhook

Inherits:
r10k::params
Defined in:
manifests/webhook.pp

Summary

install and configure the webhook-go package as local webhook receiver to trigger r10k runs

Overview

Parameters:

  • install_method (Enum['package', 'repo', 'none']) (defaults to: 'package')

    how the package should be installed

  • ensure (Boolean) (defaults to: false)
  • version (String[1]) (defaults to: '2.9.0')
  • service_ensure (Variant[ Enum['running', 'stopped'], Boolean ]) (defaults to: 'running')
  • service_enabled (Boolean) (defaults to: true)
  • config_ensure (String) (defaults to: 'file')
  • config_path (String) (defaults to: '/etc/voxpupuli/webhook.yml')
  • chatops (R10k::Webhook::Config::ChatOps) (defaults to: { enabled => false, service => undef, channel => undef, user => undef, auth_token => undef, server_uri => undef, })
  • tls (R10k::Webhook::Config::Server::Tls) (defaults to: { enabled => false, certificate => undef, key => undef, })
  • server (R10k::Webhook::Config::Server) (defaults to: { protected => true, user => 'puppet', password => 'puppet', port => 4000, tls => $tls, })
  • r10k (R10k::Webhook::Config::R10k) (defaults to: { command_path => '/opt/puppetlabs/puppet/bin/r10k', config_path => '/etc/puppetlabs/r10k/r10k.yaml', default_branch => 'production', prefix => undef, allow_uppercase => false, verbose => true, deploy_modules => true, generate_types => true, })
  • config (R10k::Webhook::Config) (defaults to: { server => $server, chatops => $chatops, r10k => $r10k, })


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'manifests/webhook.pp', line 17

class r10k::webhook (
  Enum['package', 'repo', 'none'] $install_method = 'package',
  Boolean $ensure = false,
  String[1] $version = '2.9.0',
  Variant[
    Enum['running', 'stopped'],
    Boolean
  ] $service_ensure = 'running',
  Boolean $service_enabled = true,
  String $config_ensure                      = 'file',
  String $config_path                        = '/etc/voxpupuli/webhook.yml',
  R10k::Webhook::Config::ChatOps $chatops    = {
    enabled    => false,
    service    => undef,
    channel    => undef,
    user       => undef,
    auth_token => undef,
    server_uri => undef,
  },
  R10k::Webhook::Config::Server::Tls $tls    = {
    enabled     => false,
    certificate => undef,
    key         => undef,
  },
  R10k::Webhook::Config::Server $server      = {
    protected => true,
    user      => 'puppet',
    password  => 'puppet',
    port      => 4000,
    tls       => $tls,
  },
  R10k::Webhook::Config::R10k $r10k = {
    command_path    => '/opt/puppetlabs/puppet/bin/r10k',
    config_path     => '/etc/puppetlabs/r10k/r10k.yaml',
    default_branch  => 'production',
    prefix          => undef,
    allow_uppercase => false,
    verbose         => true,
    deploy_modules  => true,
    generate_types  => true,
  },
  R10k::Webhook::Config $config              = {
    server  => $server,
    chatops => $chatops,
    r10k    => $r10k,
  },
) inherits r10k::params {
  contain r10k::webhook::package
  contain r10k::webhook::config
  contain r10k::webhook::service

  Class['r10k::webhook::package']
  -> Class['r10k::webhook::config']
  ~> Class['r10k::webhook::service']
}