parent
96e98c8c53
commit
65f305159d
|
@ -1,3 +1,25 @@
|
|||
# Define: mysql::database::create
|
||||
#
|
||||
# Create a MySQL database
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# [*username*] - name of the user the database belongs to
|
||||
# [*password*] - password of the user the database belongs to
|
||||
# [*privileges*] - privileges of the user the database belongs to
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# mysql
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
# mysql::database::create { 'icinga2':
|
||||
# username => 'icinga2',
|
||||
# password => 'icinga2',
|
||||
# privileges => 'SELECT,INSERT,UPDATE,DELETE',
|
||||
# }
|
||||
#
|
||||
define mysql::database::create ($username, $password, $privileges) {
|
||||
include mysql
|
||||
|
||||
|
|
|
@ -1,3 +1,27 @@
|
|||
# Define: mysql::database::populate
|
||||
#
|
||||
# Create and populate a MySQL database
|
||||
#
|
||||
# Parameters:
|
||||
#
|
||||
# [*username*] - name of the user the database belongs to
|
||||
# [*password*] - password of the user the database belongs to
|
||||
# [*privileges*] - privileges of the user the database belongs to
|
||||
# [*schemafile*] - file with the schema for the database
|
||||
#
|
||||
# Requires:
|
||||
#
|
||||
# mysql::database::create
|
||||
#
|
||||
# Sample Usage:
|
||||
#
|
||||
# mysql::database::populate { 'icinga2':
|
||||
# username => 'icinga2',
|
||||
# password => 'icinga2',
|
||||
# privileges => 'SELECT,INSERT,UPDATE,DELETE',
|
||||
# schemafile => '/usr/share/icinga2-ido-mysql/schema/mysql.sql',
|
||||
# }
|
||||
#
|
||||
define mysql::database::populate ($username, $password, $privileges, $schemafile) {
|
||||
Exec { path => '/usr/bin' }
|
||||
|
||||
|
|
Loading…
Reference in New Issue