Skip to content

Instantly share code, notes, and snippets.

@mgagne
Created November 20, 2014 21:17
Show Gist options
  • Save mgagne/6ed00808815b0af0fe0e to your computer and use it in GitHub Desktop.
Save mgagne/6ed00808815b0af0fe0e to your computer and use it in GitHub Desktop.
class nova (
$database_connection = false,
) {
# backward compat stuff
# include ::nova::database
}
class nova::scheduler {
include ::nova::database
}
class nova::database (
$connection = undef,
) {
$_connection = pick($connection, $::nova::database_connection, false)
if $_connection {
nova_config { 'database/connection': value => $_connection }
} else {
nova_config { 'database/connection': ensure => absent }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment