Puppet Class: mariadb::repo

Inherits:
mariadb::params
Defined in:
manifests/repo.pp

Overview

Parameters:

  • repo_version (Pattern[/^\d+\.?\d*$/]) (defaults to: $mariadb::params::repo_version)
  • percona_repo (Boolean) (defaults to: false)


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
# File 'manifests/repo.pp', line 5

class mariadb::repo (
  Pattern[/^\d+\.?\d*$/] $repo_version = $mariadb::params::repo_version,
  Boolean $percona_repo = false,
) inherits mariadb::params {

  $os = $::operatingsystem ? {
    'RedHat' => 'rhel',
    'CentOS' => 'centos',
    'Fedora' => 'fedora',
    'Debian' => 'debian',
    'Ubuntu' => 'ubuntu',
  }
  $arch = $::architecture ? {
    'i386'   => 'x86',
    'x86_64' => 'amd64',
    default  => $::architecture,
  }

  case $::osfamily {
    'RedHat': {
      include 'mariadb::repo::yum'
    }
    'Debian': {
      include 'mariadb::repo::apt'
    }
    default: {
      fail("Unsupported managed repository for ${::osfamily}, currently only supports RedHat and Debian")
    }
  }

  if $percona_repo {
    include 'mariadb::repo::percona'
  }
}