Puppet Class: puppet::reports::xmpp

Defined in:
manifests/reports/xmpp.pp

Overview

A report plugin to send XMPP to people when nodes fail. See www.kartar.net/2011/06/puppet-xmpp/ and github.com/barn/puppet-xmpp

Parameters:

  • jid (Any)
  • password (Any)
  • dashboard (Any)
  • target (Any) (defaults to: [])
  • ignore_hosts (Any) (defaults to: [])


5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'manifests/reports/xmpp.pp', line 5

class puppet::reports::xmpp($jid, $password, $dashboard, $target = [], $ignore_hosts = []) {

  Package{ provider => 'gem', ensure => present }

  package{
    'xmpp4r':;
    'json':;
    'httparty':;
  }

  # This is a little bit dirty, as it just throws it straight in the
  # rubylib, but it's better than messing with libdir on the master.
  # See https://projects.puppetlabs.com/issues/4345 for mild
  # discussion.
  file{
    "${puppet::server::report_dir}/xmpp.rb":
      ensure => present,
      owner  => 'root',
      group  => 'root',
      mode   => '0644',
      source => 'puppet:///modules/puppet/reports/xmpp.rb',
      notify => Class['puppet::server'];
    '/etc/puppet/xmpp.yaml':
      ensure => present,
      owner  => 'root',
      group  => 'puppet',
      mode   => '0440',
      source => 'puppet:///modules/puppet/reports/xmpp.yaml',
      notify => Class['puppet::server'];
  }

}