adding defaults to case statements, failing if not supported DB is given

Signed-off-by: Nick Chappell <nick@intronic.org>
This commit is contained in:
Steven Bambling 2014-09-26 11:40:36 -07:00 committed by Nick Chappell
parent 477c4317de
commit a77203195a

View file

@ -44,6 +44,7 @@ class icinga2::server (
case $server_db_type {
'mysql': { $server_db_schema_path = '/usr/share/icinga2-ido-mysql/schema/mysql.sql' }
'pgsql': { $server_db_schema_path = '/usr/share/icinga2-ido-pgsql/schema/pgsql.sql' }
default: { fail("${server_db_type} is not supported") }
}
}
@ -53,6 +54,7 @@ class icinga2::server (
case $server_db_type {
'mysql': { $server_db_schema_path = '/usr/share/icinga2-ido-mysql/schema/mysql.sql' }
'pgsql': { $server_db_schema_path = '/usr/share/icinga2-ido-pgsql/schema/pgsql.sql' }
default: { fail("${server_db_type} is not supported") }
}
}
@ -62,6 +64,7 @@ class icinga2::server (
case $server_db_type {
'mysql': { $server_db_schema_path = '/usr/share/icinga2-ido-mysql/schema/mysql.sql' }
'pgsql': { $server_db_schema_path = '/usr/share/icinga2-ido-pgsql/schema/pgsql.sql' }
default: { fail("${server_db_type} is not supported") }
}
}