Skip to content

Commit a663739

Browse files
authored
Merge pull request #1537 from smortex/typo
Improve documentation
2 parents ec44f87 + a612646 commit a663739

File tree

8 files changed

+65
-25
lines changed

8 files changed

+65
-25
lines changed

REFERENCE.md

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@
4444

4545
#### Public Resource types
4646

47-
* [`mysql_grant`](#mysql_grant): @summary Manage a MySQL user's rights.
47+
* [`mysql_database`](#mysql_database): Manage a MySQL database.
48+
* [`mysql_grant`](#mysql_grant): Manage a MySQL user's rights.
4849
* [`mysql_login_path`](#mysql_login_path): Manage a MySQL login path.
4950
* [`mysql_plugin`](#mysql_plugin): Manage MySQL plugins.
50-
* [`mysql_user`](#mysql_user): @summary Manage a MySQL user. This includes management of users password as well as privileges.
51+
* [`mysql_user`](#mysql_user): Manage a MySQL user. This includes management of users password as well as privileges.
5152

5253
#### Private Resource types
5354

54-
* `mysql_database`: Manage a MySQL database.
5555
* `mysql_datadir`: Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above).
5656

5757
### Functions
@@ -1158,8 +1158,8 @@ The following parameters are available in the `mysql::db` defined type:
11581158
##### <a name="-mysql--db--name"></a>`name`
11591159

11601160
The name of the database to create. Database names must:
1161-
* be longer than 64 characters.
1162-
* not contain / \ or . characters.
1161+
* not be longer than 64 characters.
1162+
* not contain '/' '\' or '.' characters.
11631163
* not contain characters that are not permitted in file names.
11641164
* not end with space characters.
11651165

@@ -1281,9 +1281,58 @@ Default value: `undef`
12811281

12821282
## Resource types
12831283

1284+
### <a name="mysql_database"></a>`mysql_database`
1285+
1286+
Manage a MySQL database.
1287+
1288+
#### Properties
1289+
1290+
The following properties are available in the `mysql_database` type.
1291+
1292+
##### `charset`
1293+
1294+
Valid values: `%r{^\S+$}`
1295+
1296+
The CHARACTER SET setting for the database
1297+
1298+
Default value: `utf8`
1299+
1300+
##### `collate`
1301+
1302+
Valid values: `%r{^\S+$}`
1303+
1304+
The COLLATE setting for the database
1305+
1306+
Default value: `utf8_general_ci`
1307+
1308+
##### `ensure`
1309+
1310+
Valid values: `present`, `absent`
1311+
1312+
The basic property that the resource should be in.
1313+
1314+
Default value: `present`
1315+
1316+
#### Parameters
1317+
1318+
The following parameters are available in the `mysql_database` type.
1319+
1320+
* [`name`](#-mysql_database--name)
1321+
* [`provider`](#-mysql_database--provider)
1322+
1323+
##### <a name="-mysql_database--name"></a>`name`
1324+
1325+
namevar
1326+
1327+
The name of the MySQL database to manage.
1328+
1329+
##### <a name="-mysql_database--provider"></a>`provider`
1330+
1331+
The specific backend to use for this `mysql_database` resource. You will seldom need to specify this --- Puppet will
1332+
usually discover the appropriate provider for your platform.
1333+
12841334
### <a name="mysql_grant"></a>`mysql_grant`
12851335

1286-
@summary
12871336
Manage a MySQL user's rights.
12881337

12891338
#### Properties
@@ -1483,7 +1532,6 @@ usually discover the appropriate provider for your platform.
14831532

14841533
### <a name="mysql_user"></a>`mysql_user`
14851534

1486-
@summary
14871535
Manage a MySQL user. This includes management of users password as well as privileges.
14881536

14891537
#### Properties

lib/puppet/type/mysql_database.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@
22

33
Puppet::Type.newtype(:mysql_database) do
44
@doc = <<-PUPPET
5-
@summary
6-
Manage a MySQL database.
7-
8-
@api private
5+
@summary Manage a MySQL database.
96
PUPPET
107

118
ensurable

lib/puppet/type/mysql_datadir.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
Puppet::Type.newtype(:mysql_datadir) do
44
@doc = <<-PUPPET
5-
@summary
6-
Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above).
5+
@summary Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above).
76
87
@api private
98
PUPPET

lib/puppet/type/mysql_grant.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
Puppet::Type.newtype(:mysql_grant) do
44
@doc = <<-PUPPET
5-
@summary
6-
Manage a MySQL user's rights.
5+
@summary Manage a MySQL user's rights.
76
PUPPET
87
ensurable
98

lib/puppet/type/mysql_login_path.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
name: 'mysql_login_path',
77

88
docs: <<-DESCRIPTION,
9-
@summary
10-
Manage a MySQL login path.
9+
@summary Manage a MySQL login path.
1110
@see
1211
https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html
1312
@example

lib/puppet/type/mysql_plugin.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
Puppet::Type.newtype(:mysql_plugin) do
44
@doc = <<-PUPPET
5-
@summary
6-
Manage MySQL plugins.
5+
@summary Manage MySQL plugins.
76
87
@example
98
mysql_plugin { 'some_plugin':

lib/puppet/type/mysql_user.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# This has to be a separate type to enable collecting
44
Puppet::Type.newtype(:mysql_user) do
55
@doc = <<-PUPPET
6-
@summary
7-
Manage a MySQL user. This includes management of users password as well as privileges.
6+
@summary Manage a MySQL user. This includes management of users password as well as privileges.
87
PUPPET
98

109
ensurable

manifests/db.pp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#
1212
# @param name
1313
# The name of the database to create. Database names must:
14-
# * be longer than 64 characters.
15-
# * not contain / \ or . characters.
14+
# * not be longer than 64 characters.
15+
# * not contain '/' '\' or '.' characters.
1616
# * not contain characters that are not permitted in file names.
1717
# * not end with space characters.
1818
# @param user
@@ -68,8 +68,8 @@
6868
# Ensure that the database name is valid.
6969
if $dbname !~ /^[^\/?%*:|\""<>.\s;]{1,64}$/ {
7070
$message = "The database name '${dbname}' is invalid. Values must:
71-
* be longer than 64 characters.
72-
* not contain // \\ or . characters.
71+
* not be longer than 64 characters.
72+
* not contain '/' '\\' or '.' characters.
7373
* not contain characters that are not permitted in file names.
7474
* not end with space characters."
7575
fail($message)

0 commit comments

Comments
 (0)