Cleaned up the privilege assignment in the mysqldump backup script
This commit is contained in:
parent
49f273a42c
commit
1018a0370a
1 changed files with 11 additions and 14 deletions
|
@ -26,23 +26,20 @@ class mysql::backup::mysqldump (
|
|||
require => Class['mysql::server::root_password'],
|
||||
}
|
||||
|
||||
|
||||
if $include_triggers {
|
||||
mysql_grant { "${backupuser}@localhost/*.*":
|
||||
ensure => $ensure,
|
||||
user => "${backupuser}@localhost",
|
||||
table => '*.*',
|
||||
privileges => [ 'SELECT', 'RELOAD', 'LOCK TABLES', 'SHOW VIEW', 'PROCESS', 'TRIGGER' ],
|
||||
require => Mysql_user["${backupuser}@localhost"],
|
||||
}
|
||||
$privs = [ 'SELECT', 'RELOAD', 'LOCK TABLES', 'SHOW VIEW', 'PROCESS', 'TRIGGER' ]
|
||||
} else {
|
||||
$privs = [ 'SELECT', 'RELOAD', 'LOCK TABLES', 'SHOW VIEW', 'PROCESS' ]
|
||||
}
|
||||
|
||||
mysql_grant { "${backupuser}@localhost/*.*":
|
||||
ensure => $ensure,
|
||||
user => "${backupuser}@localhost",
|
||||
table => '*.*',
|
||||
privileges => [ 'SELECT', 'RELOAD', 'LOCK TABLES', 'SHOW VIEW', 'PROCESS' ],
|
||||
privileges => $privs,
|
||||
require => Mysql_user["${backupuser}@localhost"],
|
||||
}
|
||||
}
|
||||
|
||||
cron { 'mysql-backup':
|
||||
ensure => $ensure,
|
||||
|
|
Loading…
Reference in a new issue