Rip out backup class parameter defaults.
No need for setting default values to class parameters and then testing to confirm they are set to non-default values. Simply do not give them values to begin with.
This commit is contained in:
parent
4158137278
commit
fbee243ff6
2 changed files with 4 additions and 11 deletions
|
@ -22,16 +22,12 @@
|
|||
# }
|
||||
#
|
||||
class mysql::backup (
|
||||
$ensure = 'present',
|
||||
$backupuser = $mysql::params::backupuser,
|
||||
$backuppassword = $mysql::params::backuppassword,
|
||||
$backupdir = $mysql::params::backupdir
|
||||
$backupuser,
|
||||
$backuppassword,
|
||||
$backupdir,
|
||||
$ensure = 'present'
|
||||
) {
|
||||
|
||||
if $backupuser == 'UNSET' or $backupdir == 'UNSET' or $backuppassword == 'UNSET' {
|
||||
fail('mysql::backup - You must specify a backup user, password, and target directory.')
|
||||
}
|
||||
|
||||
database_user { "${backupuser}@localhost":
|
||||
ensure => $ensure,
|
||||
password_hash => mysql_password($backuppassword),
|
||||
|
|
|
@ -21,9 +21,6 @@ class mysql::params {
|
|||
$ssl_ca = '/etc/mysql/cacert.pem'
|
||||
$ssl_cert = '/etc/mysql/server-cert.pem'
|
||||
$ssl_key = '/etc/mysql/server-key.pem'
|
||||
$backupuser = 'UNSET'
|
||||
$backuppassword = 'UNSET'
|
||||
$backupdir = 'UNSET'
|
||||
|
||||
case $::operatingsystem {
|
||||
"Ubuntu": {
|
||||
|
|
Loading…
Reference in a new issue