From 76fbba7c159866025b9fd99fe68ebf7512c31c2c Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 2 Oct 2009 13:48:31 +0200 Subject: refactor everything into its own file --- manifests/puppetmaster/hasdb.pp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 manifests/puppetmaster/hasdb.pp (limited to 'manifests/puppetmaster/hasdb.pp') 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, } } + } +} -- cgit v1.2.3