summaryrefslogtreecommitdiff
path: root/manifests/master/hasdb.pp
blob: d3bf388ea6979370fa01ba89da90a06271bc063c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
define puppet::master::hasdb (
  $dbtype = 'mysql',
  $dbname = 'puppet',
  $dbhost = 'localhost',
  # this is needed due to the collection of the databases
  $dbhostfqdn = $::fqdn,
  $dbuser = 'puppet',
  $dbpwd = hiera('puppet_master_storeconfigs_password',false),
  $dbconnectinghost = 'locahost'
) {

  if !$dbpwd { fail("No \$puppet_master_storeconfig_password is set, please set it in your hiera database") }

  case $dbtype {
    'mysql': {  puppet::master::hasdb::mysql{$name: dbname => $dbname, dbhost => $dbhost, dbuser => $dbuser, dbpwd => $dbpwd, } }
  }
}