Puppet Class: ratbox

Inherits:
ratbox::params
Inherited by:
ratbox::default
Defined in:
manifests/init.pp

Overview

Class: ratbox

This module manages ratbox and its config

Actions:

Requires:

ripienaar-concat module

Parameters:

  • conffile (Any) (defaults to: $ratbox::params::conffile)
  • package (Any) (defaults to: $ratbox::params::package)


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
37
38
39
# File 'manifests/init.pp', line 10

class ratbox (
  $conffile = $ratbox::params::conffile,
  $package = $ratbox::params::package
) inherits ratbox::params {

  package { $package:
    ensure => present,
  }
  service { 'ircd-ratbox':
    ensure  => running,
    enable  => true,
    hasrestart => true,
    hasstatus => false
  }
  exec { 'eanble-ircd-service':
    command => "sed -i 's/ENABLED=0/ENABLED=1/' /etc/init.d/ircd-ratbox",
    onlyif => 'grep -c ENABLED=0 /etc/init.d/ircd-ratbox',
    notify => Service['ircd-ratbox'],
    require => Package[$package],
  }

  include concat::setup
  concat { $conffile:
    owner   => "root",
    group   => "irc",
    mode    => "440",
    require => Package[$package],
    notify  => Service['ircd-ratbox'],
  }
}