public
Description: Modules for puppet.
Homepage:
Clone URL: git://github.com/apenney/puppet.git
puppet / iclassify / manifests / mysql.pp
100644 18 lines (14 sloc) 0.576 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
##
## Setup MySQL
##
 
class iclassify::mysql {
 
    exec { "mysqladmin -u root create iclassify_production":
        path => "/usr/bin:/usr/sbin:/bin",
        unless => 'ls /var/lib/mysql/iclassify_production/',
        require => [ Service["mysqld"], Exec["mysql-password"], File["/root/.my.cnf"] ],
    }
 
    exec { "mysql -u root --execute=\"GRANT ALL ON iclassify_production.* TO iclassify@localhost IDENTIFIED BY '$dbpass' ;\"":
        path => "/usr/bin:/usr/sbin:/bin",
        require => [ Service["mysqld"], Exec["mysql-password"], File["/root/.my.cnf"] ],
    }
}