Puppet Class: proxysql

Defined in:
modules/proxysql/manifests/init.pp

Overview

Parameters:

  • admin_password (Any)
  • datadir (Any) (defaults to: '/var/lib/proxysql')
  • admin_user (Any) (defaults to: 'admin')
  • admin_port (Any) (defaults to: 6032)
  • admin_interface (Any) (defaults to: '127.0.0.1')
  • admin_socket (Any) (defaults to: '/tmp/proxysql_admin.sock')
  • mysql_port (Any) (defaults to: 6033)
  • mysql_interface (Any) (defaults to: '0.0.0.0')
  • mysql_socket (Any) (defaults to: '/tmp/proxysql.sock')


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
# File 'modules/proxysql/manifests/init.pp', line 3

class proxysql (
    $admin_password,
    $datadir         = '/var/lib/proxysql',
    $admin_user      = 'admin',
    $admin_port      = 6032,
    $admin_interface = '127.0.0.1',
    $admin_socket    = '/tmp/proxysql_admin.sock',
    $mysql_port      = 6033,
    $mysql_interface = '0.0.0.0',
    $mysql_socket    = '/tmp/proxysql.sock',
    ) {

    # Install package
    require_package ('proxysql')

    # Users are setup by the package

    # Minimal basic config, with the right owner
    file { '/etc/proxysql.cnf':
        ensure  => present,
        owner   => 'proxysql',
        group   => 'proxysql',
        mode    => '0440',
        content => template('proxysql/proxysql.cnf.erb'),
        require => Package['proxysql'],
    }

    # mostly sqlite internal config cache, let's make sure it has
    # the right owner
    # It should be handled automatically by the package
    #file {'/var/lib/proxysql':
    #    ensure => directory,
    #    owner  => 'proxysql',
    #    group  => 'proxysql',
    #    mode   => '0750',
    #}
}