Skip to content

Commit f1dbbfd

Browse files
author
osmith
committed
2 parents e148572 + 014e1f1 commit f1dbbfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+540
-417
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@
2222
/convert_report.txt
2323
/update_report.txt
2424
.DS_Store
25+
.vscode/
26+
.envrc

.pdkignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
/convert_report.txt
2323
/update_report.txt
2424
.DS_Store
25+
.vscode/
26+
.envrc
2527
/appveyor.yml
2628
/.fixtures.yml
2729
/Gemfile

.puppet-lint.rc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
--relative

.sync.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
---
2+
.gitignore:
3+
required:
4+
- ---.project
5+
26
.travis.yml:
37
docker_sets:
48
- set: docker/centos-7

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [v8.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v8.0.1) (2019-03-20)
6+
7+
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.0.0...v8.0.1)
8+
9+
### Fixed
10+
11+
- \(MODULES-8684\) - Removing private tags from Puppet Types [\#1170](https://github.com/puppetlabs/puppetlabs-mysql/pull/1170) ([david22swan](https://github.com/david22swan))
12+
513
## [8.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.0) (2019-01-18)
614

715
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/7.0.0...8.0.0)

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -181,23 +181,22 @@ If required, the password can also be an empty string to allow connections witho
181181
This example shows how to do a minimal installation of a Percona server on a
182182
CentOS system. This sets up the Percona server, client, and bindings (including Perl and Python bindings). You can customize this usage and update the version as needed.
183183

184-
This usage has been tested on Puppet 4.4 / CentOS 7 / Percona Server 5.7.
184+
This usage has been tested on Puppet 4.4, 5.5 and 6.3.0 / CentOS 7 / Percona Server 5.7.
185185

186186
**Note:** The installation of the yum repository is not part of this package
187187
and is here only to show a full example of how you can install.
188188

189189
```puppet
190190
yumrepo { 'percona':
191191
descr => 'CentOS $releasever - Percona',
192-
baseurl => 'http://repo.percona.com/centos/$releasever/os/$basearch/',
193-
gpgkey => 'http://www.percona.com/downloads/percona-release/RPM-GPG-KEY-percona',
192+
baseurl => 'http://repo.percona.com/percona/yum/release/$releasever/RPMS/$basearch',
193+
gpgkey => 'https://repo.percona.com/yum/PERCONA-PACKAGING-KEY',
194194
enabled => 1,
195195
gpgcheck => 1,
196196
}
197197
198198
class {'mysql::server':
199199
package_name => 'Percona-Server-server-57',
200-
package_ensure => '5.7.11-4.1.el7',
201200
service_name => 'mysql',
202201
config_file => '/etc/my.cnf',
203202
includedir => '/etc/my.cnf.d',
@@ -216,18 +215,15 @@ class {'mysql::server':
216215
# Note: Installing Percona-Server-server-57 also installs Percona-Server-client-57.
217216
# This shows how to install the Percona MySQL client on its own
218217
class {'mysql::client':
219-
package_name => 'Percona-Server-client-57',
220-
package_ensure => '5.7.11-4.1.el7',
218+
package_name => 'Percona-Server-client-57'
221219
}
222220
223221
# These packages are normally installed along with Percona-Server-server-57
224222
# If you needed to install the bindings, however, you could do so with this code
225223
class { 'mysql::bindings':
226224
client_dev_package_name => 'Percona-Server-shared-57',
227-
client_dev_package_ensure => '5.7.11-4.1.el7',
228225
client_dev => true,
229226
daemon_dev_package_name => 'Percona-Server-devel-57',
230-
daemon_dev_package_ensure => '5.7.11-4.1.el7',
231227
daemon_dev => true,
232228
perl_enable => true,
233229
perl_package_name => 'perl-DBD-MySQL',
@@ -421,7 +417,7 @@ Plugins can be installed by using the `mysql_plugin` defined type. See `examples
421417
* `mysql::client::install`: Installs MySQL client.
422418
* `mysql::backup::mysqldump`: Implements mysqldump backups.
423419
* `mysql::backup::mysqlbackup`: Implements backups with Oracle MySQL Enterprise Backup.
424-
* `mysql::backup::xtrabackup`: Implements backups with XtraBackup from Percona.
420+
* `mysql::backup::xtrabackup`: Implements backups with XtraBackup from Percona or Mariabackup.
425421

426422
### Parameters
427423

REFERENCE.md

Lines changed: 111 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ _Private Classes_
1818

1919
* `mysql::backup::mysqlbackup`: Manage the mysqlbackup client.
2020
* `mysql::backup::mysqldump`: "Provider" for mysqldump
21-
* `mysql::backup::xtrabackup`: "Provider" for Percona XtraBackup
21+
* `mysql::backup::xtrabackup`: "Provider" for Percona XtraBackup or MariaBackup
2222
* `mysql::bindings::client_dev`: Private class for installing client development bindings
2323
* `mysql::bindings::daemon_dev`: Private class for installing daemon development bindings
2424
* `mysql::bindings::java`: Private class for installing java language bindings.
@@ -45,25 +45,20 @@ _Private Classes_
4545

4646
_Public Resource types_
4747

48+
* [`mysql_grant`](#mysql_grant): @summary Manage a MySQL user's rights.
4849
* [`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.
4951

5052
_Private Resource types_
5153

5254
* `mysql_database`: Manage a MySQL database.
5355
* `mysql_datadir`: Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above).
54-
* `mysql_grant`: Manage a MySQL user's rights.
55-
* `mysql_user`: Manage a MySQL user. This includes management of users password as well as privileges.
5656

5757
**Functions**
5858

5959
* [`mysql::password`](#mysqlpassword): Hash a string as mysql's "PASSWORD()" function would do it
6060
* [`mysql::strip_hash`](#mysqlstrip_hash): When given a hash this function strips out all blank entries.
61-
* [`mysql_password`](#mysql_password): A wrapper for the 4.x function 'mysql::password' to bridge the gap between
62-
it and the 3.x function 'mysql_password'.
6361
* [`mysql_password`](#mysql_password): Hash a string as mysql's "PASSWORD()" function would do it
64-
* [`mysql_strip_hash`](#mysql_strip_hash): A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
65-
it and the 3.x function 'mysql_strip_hash'.
66-
* [`mysql_strip_hash`](#mysql_strip_hash): TEMPORARY FUNCTION: EXPIRES 2014-03-10 When given a hash this function strips out all blank entries.
6762

6863
**Tasks**
6964

@@ -1050,6 +1045,51 @@ Default value: $mysql::params::exec_path
10501045

10511046
## Resource types
10521047

1048+
### mysql_grant
1049+
1050+
@summary
1051+
Manage a MySQL user's rights.
1052+
1053+
#### Properties
1054+
1055+
The following properties are available in the `mysql_grant` type.
1056+
1057+
##### `ensure`
1058+
1059+
Valid values: present, absent
1060+
1061+
The basic property that the resource should be in.
1062+
1063+
Default value: present
1064+
1065+
##### `privileges`
1066+
1067+
Privileges for user
1068+
1069+
##### `table`
1070+
1071+
Valid values: %r{.*\..*}, %r{^[0-9a-zA-Z$_]*@[\w%\.:\-/]*$}
1072+
1073+
Table to apply privileges to.
1074+
1075+
##### `user`
1076+
1077+
User to operate on.
1078+
1079+
##### `options`
1080+
1081+
Options to grant.
1082+
1083+
#### Parameters
1084+
1085+
The following parameters are available in the `mysql_grant` type.
1086+
1087+
##### `name`
1088+
1089+
namevar
1090+
1091+
Name to describe the grant.
1092+
10531093
### mysql_plugin
10541094

10551095
Manage MySQL plugins.
@@ -1092,95 +1132,105 @@ namevar
10921132

10931133
The name of the MySQL plugin to manage.
10941134

1095-
## Functions
1135+
### mysql_user
10961136

1097-
### mysql::password
1137+
@summary
1138+
Manage a MySQL user. This includes management of users password as well as privileges.
10981139

1099-
Type: Ruby 4.x API
1140+
#### Properties
11001141

1101-
Hash a string as mysql's "PASSWORD()" function would do it
1142+
The following properties are available in the `mysql_user` type.
11021143

1103-
#### `mysql::password(String $password)`
1144+
##### `ensure`
11041145

1105-
The mysql::password function.
1146+
Valid values: present, absent
11061147

1107-
Returns: `String` hash
1108-
The mysql password hash from the clear text password.
1148+
The basic property that the resource should be in.
11091149

1110-
##### `password`
1150+
Default value: present
11111151

1112-
Data type: `String`
1152+
##### `password_hash`
11131153

1114-
Plain text password.
1154+
Valid values: %r{\w*}
11151155

1116-
### mysql::strip_hash
1156+
The password hash of the user. Use mysql_password() for creating such a hash.
11171157

1118-
Type: Ruby 4.x API
1158+
##### `plugin`
11191159

1120-
When given a hash this function strips out all blank entries.
1160+
Valid values: %r{\w+}
11211161

1122-
#### `mysql::strip_hash(Hash $hash)`
1162+
The authentication plugin of the user.
11231163

1124-
The mysql::strip_hash function.
1164+
##### `max_user_connections`
11251165

1126-
Returns: `Hash` hash
1127-
The given hash with all blank entries removed
1166+
Valid values: %r{\d+}
11281167

1129-
##### `hash`
1168+
Max concurrent connections for the user. 0 means no (or global) limit.
11301169

1131-
Data type: `Hash`
1170+
##### `max_connections_per_hour`
11321171

1133-
Hash to be stripped
1172+
Valid values: %r{\d+}
11341173

1135-
### mysql_password
1174+
Max connections per hour for the user. 0 means no (or global) limit.
11361175

1137-
Type: Ruby 4.x API
1176+
##### `max_queries_per_hour`
11381177

1139-
A wrapper for the 4.x function 'mysql::password' to bridge the gap between
1140-
it and the 3.x function 'mysql_password'.
1178+
Valid values: %r{\d+}
11411179

1142-
#### `mysql_password(String $password)`
1180+
Max queries per hour for the user. 0 means no (or global) limit.
11431181

1144-
The mysql_password function.
1182+
##### `max_updates_per_hour`
11451183

1146-
Returns: `String` The mysql password hash from the 4.x function mysql::password.
1184+
Valid values: %r{\d+}
11471185

1148-
##### `password`
1186+
Max updates per hour for the user. 0 means no (or global) limit.
11491187

1150-
Data type: `String`
1188+
##### `tls_options`
11511189

1152-
Plain text password.
1190+
Options to that set the TLS-related REQUIRE attributes for the user.
11531191

1154-
### mysql_password
1192+
#### Parameters
11551193

1156-
Type: Ruby 3.x API
1194+
The following parameters are available in the `mysql_user` type.
1195+
1196+
##### `name`
1197+
1198+
namevar
1199+
1200+
The name of the user. This uses the 'username@hostname' or username@hostname.
1201+
1202+
## Functions
1203+
1204+
### mysql::password
1205+
1206+
Type: Ruby 4.x API
11571207

11581208
Hash a string as mysql's "PASSWORD()" function would do it
11591209

1160-
#### `mysql_password(String $password)`
1210+
#### `mysql::password(String $password)`
11611211

1162-
The mysql_password function.
1212+
The mysql::password function.
11631213

1164-
Returns: `String` the mysql password hash from the clear text password.
1214+
Returns: `String` hash
1215+
The mysql password hash from the clear text password.
11651216

11661217
##### `password`
11671218

11681219
Data type: `String`
11691220

11701221
Plain text password.
11711222

1172-
### mysql_strip_hash
1223+
### mysql::strip_hash
11731224

11741225
Type: Ruby 4.x API
11751226

1176-
A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
1177-
it and the 3.x function 'mysql_strip_hash'.
1227+
When given a hash this function strips out all blank entries.
11781228

1179-
#### `mysql_strip_hash(Hash $hash)`
1229+
#### `mysql::strip_hash(Hash $hash)`
11801230

1181-
The mysql_strip_hash function.
1231+
The mysql::strip_hash function.
11821232

1183-
Returns: `Hash` hash
1233+
Returns: `Hash` hash
11841234
The given hash with all blank entries removed
11851235

11861236
##### `hash`
@@ -1189,19 +1239,23 @@ Data type: `Hash`
11891239

11901240
Hash to be stripped
11911241

1192-
### mysql_strip_hash
1242+
### mysql_password
11931243

11941244
Type: Ruby 3.x API
11951245

1196-
TEMPORARY FUNCTION: EXPIRES 2014-03-10
1197-
When given a hash this function strips out all blank entries.
1246+
Hash a string as mysql's "PASSWORD()" function would do it
1247+
1248+
#### `mysql_password(String $password)`
11981249

1199-
#### `mysql_strip_hash()`
1250+
The mysql_password function.
12001251

1201-
TEMPORARY FUNCTION: EXPIRES 2014-03-10
1202-
When given a hash this function strips out all blank entries.
1252+
Returns: `String` the mysql password hash from the clear text password.
1253+
1254+
##### `password`
12031255

1204-
Returns: `Any`
1256+
Data type: `String`
1257+
1258+
Plain text password.
12051259

12061260
## Tasks
12071261

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ end
2323

2424
def changelog_future_release
2525
return unless Rake.application.top_level_tasks.include? "changelog"
26-
returnVal = JSON.load(File.read('metadata.json'))['version']
26+
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
2727
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
2828
puts "GitHubChangelogGenerator future_release:#{returnVal}"
2929
returnVal

lib/puppet/functions/mysql_password.rb

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)