parametrize xtradb package name (#860)

This commit is contained in:
Nemanja Delic 2016-07-01 15:45:35 +02:00 committed by David Schmitt
parent 2175f7de82
commit 041ef06c78
2 changed files with 26 additions and 24 deletions

View file

@ -1,29 +1,30 @@
# See README.me for usage. # See README.me for usage.
class mysql::backup::xtrabackup ( class mysql::backup::xtrabackup (
$backupuser = '', $xtrabackup_package_name = $mysql::params::xtrabackup_package_name,
$backuppassword = '', $backupuser = '',
$backupdir = '', $backuppassword = '',
$maxallowedpacket = '1M', $backupdir = '',
$backupmethod = 'mysqldump', $maxallowedpacket = '1M',
$backupdirmode = '0700', $backupmethod = 'mysqldump',
$backupdirowner = 'root', $backupdirmode = '0700',
$backupdirgroup = $mysql::params::root_group, $backupdirowner = 'root',
$backupcompress = true, $backupdirgroup = $mysql::params::root_group,
$backuprotate = 30, $backupcompress = true,
$ignore_events = true, $backuprotate = 30,
$delete_before_dump = false, $ignore_events = true,
$backupdatabases = [], $delete_before_dump = false,
$file_per_database = false, $backupdatabases = [],
$include_triggers = true, $file_per_database = false,
$include_routines = false, $include_triggers = true,
$ensure = 'present', $include_routines = false,
$time = ['23', '5'], $ensure = 'present',
$prescript = false, $time = ['23', '5'],
$postscript = false, $prescript = false,
$execpath = '/usr/bin:/usr/sbin:/bin:/sbin', $postscript = false,
$execpath = '/usr/bin:/usr/sbin:/bin:/sbin',
) inherits mysql::params { ) inherits mysql::params {
package{ 'percona-xtrabackup': package{ $xtrabackup_package_name:
ensure => $ensure, ensure => $ensure,
} }
@ -34,7 +35,7 @@ class mysql::backup::xtrabackup (
hour => $time[0], hour => $time[0],
minute => $time[1], minute => $time[1],
weekday => '0', weekday => '0',
require => Package['percona-xtrabackup'], require => Package[$xtrabackup_package_name],
} }
cron { 'xtrabackup-daily': cron { 'xtrabackup-daily':
@ -44,7 +45,7 @@ class mysql::backup::xtrabackup (
hour => $time[0], hour => $time[0],
minute => $time[1], minute => $time[1],
weekday => '1-6', weekday => '1-6',
require => Package['percona-xtrabackup'], require => Package[$xtrabackup_package_name],
} }
file { 'mysqlbackupdir': file { 'mysqlbackupdir':

View file

@ -30,6 +30,7 @@ class mysql::params {
$client_dev_package_provider = undef $client_dev_package_provider = undef
$daemon_dev_package_ensure = 'present' $daemon_dev_package_ensure = 'present'
$daemon_dev_package_provider = undef $daemon_dev_package_provider = undef
$xtrabackup_package_name = 'percona-xtrabackup'
case $::osfamily { case $::osfamily {