Puppet Class: ratticdb
- Inherits:
- ::ratticdb::params
- Defined in:
- manifests/init.pp
Summary
This module installs ratticdb and its dependenciesOverview
Module to install ratticdb
By default, this module will try to install everything that is needed to setup a ratticdb application.
This means that by default Apache httpd and Mysql will be installed
The webserver will take care of redirecting the http traffic to https
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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'manifests/init.pp', line 57
class ratticdb (
$app_folder = '/opt/apps/RatticWeb',
$apache = true,
$mysql = true,
$url = 'ratticdb.example.org',
$version = '1.3.1',
$ldap = false,
$ldap_server = 'ldap.example.org',
$user_base = 'ou=users,dc=example,dc=com',
$user_filter = '(uid=%(user)s)',
$group_base = 'ou=django,ou=groups,dc=example,dc=com',
$group_filter = '(objectClass=groupOfNames)',
$group_type = 'GroupOfNamesType',
$staff = 'cn=staff,ou=groups,dc=example,dc=com',
$db_name = 'ratticdb',
$db_user = 'ratticDbUser',
$db_user_pwd = 'ratticDbUserPassword',
$db_host = 'localhost',
$db_port = '3306',
$ssl_cert_path = $::ratticdb::params::ssl_cert_path,
$ssl_cert_key_path = $::ratticdb::params::ssl_cert_key_path,
$ssl_cert = undef,
$ssl_key = undef,
) inherits ::ratticdb::params {
if !is_integer($db_port) {
fail('db_port must be a valid integer')
}
if !is_string($db_user) {
fail('db_user must be a valid string')
}
if !is_string($db_name) {
fail('db_name must be a valid string')
}
if !is_string($db_user_pwd) {
fail('db_user_pwd must be a valid string')
}
if !is_domain_name($db_host) {
fail('db_host must be a valid domain name')
}
if !is_bool($ldap) {
fail('ldap must be a boolean')
}
if !is_domain_name($ldap_server) {
fail('ldap_server must be a valid domain name')
}
if !is_string($user_base) {
fail('user_base must be a valid string')
}
if !is_string($user_filter) {
fail('user_filter must be a valid string')
}
if !is_string($group_base) {
fail('group_base must be a valid string')
}
if !is_string($group_filter) {
fail('group_filter must be a valid string')
}
if !is_string($group_type) {
fail('group_type must be a valid string')
}
if !is_string($staff) {
fail('staff must be a valid string')
}
if !is_domain_name($url) {
fail('url must be a valid domain name')
}
if !is_absolute_path($app_folder) {
fail('app_folder must be an absolute path')
}
if !is_bool($mysql) {
fail('mysql must be a boolean')
}
if !is_bool($apache) {
fail('apache must be a boolean')
}
anchor { 'ratticdb::begin': }
-> class { 'ratticdb::packages': }
-> class { 'ratticdb::mysql': }
-> class { 'ratticdb::setup': }
-> class { 'ratticdb::apache': }
-> anchor { 'ratticdb::end': }
}
|