Module 'mysql': add documentation

refs #6842
This commit is contained in:
Alexander Klimov 2014-09-02 16:18:06 +02:00
parent 96e98c8c53
commit 65f305159d
2 changed files with 46 additions and 0 deletions

View File

@ -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

View File

@ -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' }