@@ -35,7 +35,7 @@ For detailed info about the logic and usage patterns of Example42 modules read R
3535The simplest way to create database is the following.
3636
3737 mysql::grant { 'db1':
38- mysql_username => 'myusername',
38+ mysql_user => 'myusername',
3939 mysql_password => 'mypassword',
4040 }
4141
@@ -45,7 +45,7 @@ This will create a MySQL database named 'db1' with a MySQL grant allowing full a
4545If you want to customize the host the new user can connect from you have to use the 'mysql\_ host'.
4646
4747 mysql::grant { 'db1':
48- mysql_username => 'myusername',
48+ mysql_user => 'myusername',
4949 mysql_password => 'mypassword',
5050 mysql_host => '10.42.42.0/255.255.255.0',
5151 }
@@ -56,7 +56,7 @@ Here the whole 10.42.42.0/24 can connect.
5656For privileges customization there is the 'mysql\_ privileges' parameter.
5757
5858 mysql::grant { 'db1':
59- mysql_username => 'myusername',
59+ mysql_user => 'myusername',
6060 mysql_password => 'mypassword',
6161 mysql_privileges => 'SELECT',
6262 }
@@ -68,7 +68,7 @@ Like for standard puppet resource you can use the 'ensure' parameter in order to
6868
6969 mysql::grant { 'db1':
7070 ensure => 'absent',
71- mysql_username => 'myusername',
71+ mysql_user => 'myusername',
7272 mysql_password => 'mypassword',
7373 }
7474
@@ -79,7 +79,7 @@ The mysql\_db\_init\_query\_file is an optional parameter allowing to specify a
7979
8080 mysql::grant { 'db1':
8181 ensure => 'absent',
82- mysql_username => 'myusername',
82+ mysql_user => 'myusername',
8383 mysql_password => 'mypassword',
8484 mysql_db_init_query_file => '/full/path/to/the/schema.sql',
8585 }
@@ -161,6 +161,26 @@ __NOTE__: The SQL file should already be uploaded on mysql server host.
161161 my_class => 'mysql::example42',
162162 }
163163
164+ ## USAGE - Hiera Support
165+ * Manage MySQL configuration using Hiera
166+
167+ ``` yaml
168+ mysql::template : ' modules/mysql/my.cnf.erb'
169+ mysql::root_password : ' example42'
170+ mysql::options :
171+ port : ' 3306'
172+ bind-address : ' 127.0.0.1'
173+ ` ` `
174+
175+ * Defining MySQL resources using Hiera
176+
177+ ` ` ` yaml
178+ mysql::grant_hash :
179+ ' db1 ' :
180+ mysql_user : ' myusername'
181+ mysql_password : ' mypassword'
182+ mysql_host : ' 10.42.42.0/255.255.255.0'
183+ ` ` `
164184
165185## USAGE - Example42 extensions management
166186* Activate puppi (recommended, but disabled by default)
0 commit comments