diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-25 15:45:46 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-25 15:45:46 -0200 |
commit | 5eddd2d2d48f51f9694c6e3fc49241b3f134b612 (patch) | |
tree | 8ae893a776f762f41d95871f9b2cf64f61c7c108 | |
parent | 01572197dc119ff46f4e5704bdc8ff21bbb0f7c0 (diff) | |
download | puppet-nodo-5eddd2d2d48f51f9694c6e3fc49241b3f134b612.tar.gz puppet-nodo-5eddd2d2d48f51f9694c6e3fc49241b3f134b612.tar.bz2 |
Puppet update; adding storeconfig block
-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 |