diff options
author | mh <mh@immerda.ch> | 2009-10-02 13:48:31 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2009-10-02 13:48:31 +0200 |
commit | 76fbba7c159866025b9fd99fe68ebf7512c31c2c (patch) | |
tree | f5658e09fb266cfe88c13d9ce3f2c190f56a6525 /manifests/puppetmaster/hasdb.pp | |
parent | b96c7630ffc98504d166e1f59ffa878bd9c9c447 (diff) |
refactor everything into its own file
Diffstat (limited to 'manifests/puppetmaster/hasdb.pp')
-rw-r--r-- | manifests/puppetmaster/hasdb.pp | 19 |
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, } } + } +} |