From 65f305159d340618b0bf6f906753f29db4daa7e3 Mon Sep 17 00:00:00 2001 From: Alexander Klimov Date: Tue, 2 Sep 2014 16:18:06 +0200 Subject: [PATCH] Module 'mysql': add documentation refs #6842 --- .../mysql/manifests/database/create.pp | 22 +++++++++++++++++ .../mysql/manifests/database/populate.pp | 24 +++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/.vagrant-puppet/modules/mysql/manifests/database/create.pp b/.vagrant-puppet/modules/mysql/manifests/database/create.pp index a1d242fde..fff93c6e6 100644 --- a/.vagrant-puppet/modules/mysql/manifests/database/create.pp +++ b/.vagrant-puppet/modules/mysql/manifests/database/create.pp @@ -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 diff --git a/.vagrant-puppet/modules/mysql/manifests/database/populate.pp b/.vagrant-puppet/modules/mysql/manifests/database/populate.pp index 5e3bf2d84..2d40af0b9 100644 --- a/.vagrant-puppet/modules/mysql/manifests/database/populate.pp +++ b/.vagrant-puppet/modules/mysql/manifests/database/populate.pp @@ -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' }