summaryrefslogtreecommitdiff
path: root/manifests/server/centos.pp
blob: 5c0ab3456987b4bf81fb26dd2e380d683daeecdd (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
# centos specific things
class mysql::server::centos inherits mysql::server::clientpackage {
  if $::operatingsystemmajrelease > 6 {
    Package['mysql-server']{
      name  => 'mariadb-server',
    }
    Service['mysql']{
      name  => 'mariadb',
    }
  } else {
    Service['mysql']{
      name  => 'mysqld',
    }
  }
  File['mysql_main_cnf']{
    path => '/etc/my.cnf',
  }

  file{
    '/etc/mysql':
      ensure  => directory,
      owner   => root,
      group   => 0,
      mode    => '0644';
    '/etc/mysql/conf.d':
      ensure  => directory,
      recurse => true,
      purge   => true,
      force   => true,
      owner   => root,
      group   => 0,
      mode    => '0644',
      notify  => Service['mysql'];
  }
}