summaryrefslogtreecommitdiff
path: root/manifests/puppetmaster/hasdb.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/puppetmaster/hasdb.pp')
-rw-r--r--manifests/puppetmaster/hasdb.pp19
1 files changed, 19 insertions, 0 deletions
diff --git a/manifests/puppetmaster/hasdb.pp b/manifests/puppetmaster/hasdb.pp
new file mode 100644
index 0000000..82bbe47
--- /dev/null
+++ b/manifests/puppetmaster/hasdb.pp
@@ -0,0 +1,19 @@
+define puppet::puppetmaster::hasdb(
+ $dbtype = 'mysql',
+ $dbname = 'puppet',
+ $dbhost = 'localhost',
+ # this is needed due to the collection of the databases
+ $dbhostfqdn = "${fqdn}",
+ $dbuser = 'puppet',
+ $dbpwd = $puppet_storeconfig_password,
+ $dbconnectinghost = 'locahost'
+){
+
+ case $puppet_storeconfig_password {
+ '': { fail("No \$puppet_storeconfig_password is set, please set it in your manifests or site.pp to add a password") }
+ }
+
+ case $dbtype {
+ 'mysql': { puppet::puppetmaster::hasdb::mysql{$name: dbname => $dbname, dbhost => $dbhost, dbuser => $dbuser, dbpwd => $dbpwd, } }
+ }
+}