Puppet Class: profile::cyberbot::db

Defined in:
modules/profile/manifests/cyberbot/db.pp

Overview

sets up a dedicated DB server for cyberbot



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
# File 'modules/profile/manifests/cyberbot/db.pp', line 2

class profile::cyberbot::db{

    file { '/srv/mysql':
        ensure => 'directory',
        owner  => 'mysql',
        group  => 'mysql',
    }

    file { '/srv/mysql/data':
        ensure  => 'directory',
        owner   => 'mysql',
        group   => 'mysql',
        require => File['/srv/mysql'],
    }

    ensure_packages('mariadb-server')

    service { 'mysql':
        ensure  => 'running',
        enable  => true,
        require => Package['mariadb-server'],
    }

    file { '/etc/mysql/my.cnf':
        ensure  => 'present',
        owner   => 'root',
        group   => 'root',
        mode    => '0644',
        source  => 'puppet:///modules/profile/cyberbot/my.cnf',
        require => Package['mariadb-server'],
        notify  => Service['mysql'],
    }

}