Puppet Class: roundcube::roundcubeweb

Inherits:
roundcube::params
Defined in:
manifests/roundcubeweb.pp

Overview

Parameters:

  • confdir (Any) (defaults to: $roundcube::params::confdir)
  • config_inc_php_erb (Any) (defaults to: $roundcube::params::config_inc_php_erb)
  • database_host (Any) (defaults to: $roundcube::params::database_host)
  • database_name (Any) (defaults to: $roundcube::params::database_name)
  • database_password (Any) (defaults to: $roundcube::params::database_password)
  • database_port (Any) (defaults to: $roundcube::params::database_port)
  • database_ssl (Any) (defaults to: $roundcube::params::database_ssl)
  • database_username (Any) (defaults to: $roundcube::params::database_username)
  • default_host (Any) (defaults to: $roundcube::params::default_host)
  • des_key (Any) (defaults to: $roundcube::params::des_key)
  • force_https (Any) (defaults to: $roundcube::params::force_https)
  • imap_auth_type (Any) (defaults to: $roundcube::params::imap_auth_type)
  • listen_addresses (Any) (defaults to: $roundcube::params::postgres_listen_address)
  • log_logins (Any) (defaults to: $roundcube::params::log_logins)
  • plugins (Any) (defaults to: $roundcube::params::plugins)
  • reconfigure_command (Any) (defaults to: $roundcube::params::reconfigure_command)
  • roundcube_backend (Any) (defaults to: $roundcube::params::roundcube_backend)
  • roundcube_webserver (Any) (defaults to: $roundcube::params::roundcube_webserver)
  • skin (Any) (defaults to: $roundcube::params::skin)
  • smtp_server (Any) (defaults to: $roundcube::params::smtp_server)
  • smtp_port (Any) (defaults to: $roundcube::params::smtp_port)
  • smtp_user (Any) (defaults to: $roundcube::params::smtp_user)
  • smtp_pass (Any) (defaults to: $roundcube::params::smtp_pass)
  • smtp_auth_type (Any) (defaults to: $roundcube::params::smtp_auth_type)
  • spellcheck_engine (Any) (defaults to: $roundcube::params::spellcheck_engine)
  • spellcheck_languages (Any) (defaults to: $roundcube::params::spellcheck_languages)
  • timezone (Any) (defaults to: $roundcube::params::timezone)


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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'manifests/roundcubeweb.pp', line 1

class roundcube::roundcubeweb (
  $confdir                   = $roundcube::params::confdir,
  $config_inc_php_erb        = $roundcube::params::config_inc_php_erb,
  $database_host             = $roundcube::params::database_host,
  $database_name             = $roundcube::params::database_name,
  $database_password         = $roundcube::params::database_password,
  $database_port             = $roundcube::params::database_port,
  $database_ssl              = $roundcube::params::database_ssl,
  $database_username         = $roundcube::params::database_username,
  $default_host              = $roundcube::params::default_host,
  $des_key                   = $roundcube::params::des_key,
  $force_https               = $roundcube::params::force_https,
  $imap_auth_type            = $roundcube::params::imap_auth_type,
  $listen_addresses          = $roundcube::params::postgres_listen_address,
  $log_logins                = $roundcube::params::log_logins,
  $plugins                   = $roundcube::params::plugins,
  $reconfigure_command       = $roundcube::params::reconfigure_command,
  $roundcube_backend         = $roundcube::params::roundcube_backend,
  $roundcube_webserver       = $roundcube::params::roundcube_webserver,
  $skin                      = $roundcube::params::skin,
  $smtp_server               = $roundcube::params::smtp_server,
  $smtp_port                 = $roundcube::params::smtp_port,
  $smtp_user                 = $roundcube::params::smtp_user,
  $smtp_pass                 = $roundcube::params::smtp_pass,
  $smtp_auth_type            = $roundcube::params::smtp_auth_type,
  $spellcheck_engine         = $roundcube::params::spellcheck_engine,
  $spellcheck_languages      = $roundcube::params::spellcheck_languages,
  $timezone                  = $roundcube::params::timezone,
  ) inherits roundcube::params {

  include ::roundcube::packages

  if $spellcheck_engine == 'aspell' {
    class { '::roundcube::spellchecker::aspell':
      languagelist => $spellcheck_languages
    }
  }
  else {
    include ::roundcube::spellchecker::pspell
  }

  #Set the defaults
  Ini_setting {
    path    => '/etc/dbconfig-common/roundcube.conf',
    ensure  => present,
    section => '',
    notify  => Exec['reconfigure_roundcube'],
    require => Package['roundcube-core'],
  }

  # TODO: figure out some way to make sure that the ini_file module is installed,
  #  because otherwise these will silently fail to do anything.

  ini_setting {'dbtype':
    setting => 'dbc_dbtype',
    value   => "'${roundcube_backend}'",
  }

  ini_setting {'dbuser':
    setting => 'dbc_dbuser',
    value   => "'${database_username}'",
  }

  ini_setting {'dbpass':
    setting => 'dbc_dbpass',
    value   => "'${database_password}';",
  }

  ini_setting {'dbname':
    setting => 'dbc_dbname',
    value   => "'${database_name}';",
  }

  ini_setting {'dbserver':
    setting => 'dbc_dbserver',
    value   => "'${database_host}';",
  }

  ini_setting {'dbport':
    setting => 'dbc_dbport',
    value   => "'${database_port}';",
  }

  ini_setting {'dbssl':
    setting => 'dbc_ssl',
    value   => "'${database_ssl}';",
  }

  exec { 'reconfigure_roundcube':
    refreshonly => true,
    command     => "${reconfigure_command} roundcube-core",
  }

  file { "${confdir}/config.inc.php":
    owner   => root,
    group   => www-data,
    mode    => '0640',
    content => template($config_inc_php_erb),
  }

}