aboutsummaryrefslogtreecommitdiff
path: root/manifests/role/jabber.pp
blob: c1d0494feb479958a0afbab4a29108e379712c39 (plain)
1
2
3
4
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
37
38
39
40
41
42
class nodo::role::jabber inherits nodo::base::vserver {
  include ssl
  include ejabberd

  # We can offer jabber web access in a web node, so
  # we leave this out.
  #
  #include websites::setup
  #
  #package { 'jwchat':
  #  ensure => present,
  #}

  host { "chat":
    ensure       => present,
    ip           => "127.0.0.1",
    host_aliases => [ "chat.${domain}" ],
  }

  file { [ "/etc/ejabberd/ssl", "/etc/ejabberd/ssl/certs", "/etc/ejabberd/ssl/private" ]:
    ensure  => directory,
    owner   => "root",
    group   => "ejabberd",
    mode    => 0750,
  }

  # We use a concatenated cert file
  # http://site4fast.blogspot.com.br/2011/10/ejabberd-ssl-how-to.html
  ssl::cert { "${::domain}-concat":
    owner   => 'ejabberd',
    group   => 'ejabberd',
    base    => '/etc/ejabberd/ssl',
    notify  => Service['ejabberd'],
    require => File['/etc/ejabberd/ssl/private'],
  }

  #munin::plugin { [ 'ejabberd_connections', 'ejabberd_memory',  'ejabberd_registrations',
  #                  'ejabberd_statuses',    'ejabberd_threads', 'ejabberd_uptime',
  #                  'ejabberd_users',       'ejabberd_usersindays' ]:
  #  ensure => 'ejabberd_',
  #}
}