diff options
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/master.pp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/manifests/master.pp b/manifests/master.pp index 3b02195..1c4abfa 100644 --- a/manifests/master.pp +++ b/manifests/master.pp @@ -1,5 +1,6 @@ class nodo::master { - $main_master = hiera('nodo::master::main', false) + $main_master = hiera('nodo::master::main', false) + $master_db_password = hiera('nodo::master::db_password', '') if $main_master == true { # Puppetmaster should be included before nodo::vserver @@ -40,13 +41,31 @@ class nodo::master { ensure => absent, } - case $puppetmaster_db_password { - '': { fail("Please set \$puppetmaster_db_password in your host config") } + # For storeconfigs + include mysql::server + + # Database creation as suggested by + # http://reductivelabs.com/trac/puppet/wiki/Recipes/MySQLStoredConfiguration + #exec { "create-storeconfigs-db": + # command => "/usr/bin/mysqladmin create puppet", + # unless => "/usr/bin/mysqlcheck -s puppet", + # notify => Exec["create-storeconfigs-user"], + #} + # + #$cmd = "/usr/bin/mysql -e 'grant all privileges on puppet.* to puppet@localhost identified by \"puppet\"'" + # + #exec { "create-storeconfigs-user": + # command => $cmd, + # refreshonly => true, + #} + + case $master_db_password { + '': { fail("Please set nodo::master::db_password in your config") } } # Update master's puppet.conf if you change here database::instance { "puppet": - password => "$puppetmaster_db_password", + password => "$db_password", } # Used for trac dependency graphs |