Skip to content

Configuration

David Hollinger III edited this page Oct 8, 2022 · 4 revisions

webhook.yml

Configuration is handled via a YAML file called webhook.yml.

By default, the configuration is searched for in the following locations:

  • A provided absolute path using the -c option with the webhook-go binary
  • The current directory
  • $PWD/../config/
  • $PWD/config/

NOTE: There is a bug currently where the -c option only accepts a directory to search for the configuration file

Configuration

The configuration settings are broken up into several subcategories based on the feature that is configured:

  • Server: Settings core to the functionality of webhook-go. required
  • R10k: Settings related to the r10k tool.
  • ChatOps: Settings related to ChatOps notifications.
  • Orchestration: Settings related to utilizing orchestration tools, such as Bolt or Choria, to execute r10k.

Here is a sample of what the webhook.yml looks like:

server:
  protected: false
  user: puppet
  password: puppet
  port: 4000
  tls:
    enabled: false
    certificate: ""
    key: ""
chatops:
  enabled: false
  service: slack
  channel: "#general"
  user: r10kbot
  auth_token: 12345
  server_uri: "https://rocketchat.local"
r10k:
  config_path: /etc/puppetlabs/r10k/r10k.yaml
  default_branch: webhook_test
  allow_uppercase: false
  verbose: true
orchestration:
  enabled: false 
  type: bolt
  user: dhollinger
  bolt:
    transport: local
    targets:
      - localhost
    host_key_check: false

Server

protected

Type: Boolean Description: Determines if the Webhook-Go API requires authentication. OPTIONAL Default: false

user

Type: String Description: Username required for Webhook-Go authentication. Requires protected to be set to true. OPTIONAL

password

Type: String Description: Password used for User authentication. Requires protected to be set to true AND user to be set to a non-empty string. OPTIONAL

port

Type: Integer Description: The TCP port to listen for connections on. OPTIONAL Default: 4000

tls

Type: Struct Description: A struct containing settings for enabling TLS encryption. Default: {} Options: enabled: Boolean value that enables or disabled TLS. certificate: String containing the file path to the SSL Certificate file. key: String containing the file path to the SSL Certificate Signing Key.

r10k

Clone this wiki locally