Fix mysql password re-creation by upgrading mysql module

t490
Jack Henschel 4 years ago
parent 776345b0cd
commit 077573c2f9

@ -7,5 +7,5 @@ mod "puppetlabs/firewall", "1.15.1"
mod "camptocamp/openldap", "1.17.0"
mod "herculesteam/augeasproviders_core" "2.2.0"
mod "herculesteam/augeasproviders_shellvar" "2.2.4"
mod "puppetlabs/mysql" "8.0.0"
mod "puppetlabs/mysql" "10.3.0"
mod "puppetlabs/docker" "3.5.0"

@ -2,6 +2,130 @@
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).
## [v10.3.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.3.0) (2019-12-11)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.2.1...v10.3.0)
### Added
- \(FM-8677\) - Support added for CentOS 8 [\#1254](https://github.com/puppetlabs/puppetlabs-mysql/pull/1254) ([david22swan](https://github.com/david22swan))
### Fixed
- Fix java and ruby binding packages for Debian 10 [\#1264](https://github.com/puppetlabs/puppetlabs-mysql/pull/1264) ([treydock](https://github.com/treydock))
- \(MODULES-10114\) Confine fact for only when mysql is in PATH [\#1256](https://github.com/puppetlabs/puppetlabs-mysql/pull/1256) ([bFekete](https://github.com/bFekete))
# Change log
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).
## [v10.2.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.2.1) (2019-10-30)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.2.0...v10.2.1)
### Fixed
- Fix mysql::sql task error message [\#1243](https://github.com/puppetlabs/puppetlabs-mysql/pull/1243) ([alexjfisher](https://github.com/alexjfisher))
- Fix xtrabackup regression introduced in \#1207 [\#1242](https://github.com/puppetlabs/puppetlabs-mysql/pull/1242) ([fraenki](https://github.com/fraenki))
- Repair mysql\_grant docs and diagnostics [\#1237](https://github.com/puppetlabs/puppetlabs-mysql/pull/1237) ([qha](https://github.com/qha))
## [v10.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.2.0) (2019-09-24)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.1.0...v10.2.0)
### Added
- FM-8406 add support on Debian10 [\#1230](https://github.com/puppetlabs/puppetlabs-mysql/pull/1230) ([lionce](https://github.com/lionce))
- Make backup success file path configurable [\#1207](https://github.com/puppetlabs/puppetlabs-mysql/pull/1207) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB))
### Fixed
- No package under FreeBSD [\#1227](https://github.com/puppetlabs/puppetlabs-mysql/pull/1227) ([jas01](https://github.com/jas01))
- Fix group on FreeBSD [\#1226](https://github.com/puppetlabs/puppetlabs-mysql/pull/1226) ([jas01](https://github.com/jas01))
- Don't run fact when you can't find mysqld [\#1224](https://github.com/puppetlabs/puppetlabs-mysql/pull/1224) ([jstewart612](https://github.com/jstewart612))
- Bugfix on Debian 9 : ruby\_package\_name must be ruby-mysql2 [\#1223](https://github.com/puppetlabs/puppetlabs-mysql/pull/1223) ([leopoiroux](https://github.com/leopoiroux))
- Fix errors for /bin/sh with the xtrabackup cron [\#1222](https://github.com/puppetlabs/puppetlabs-mysql/pull/1222) ([baldurmen](https://github.com/baldurmen))
- Fix/fix dependency issue in freebsd with log error file creation from 10.0.0 [\#1221](https://github.com/puppetlabs/puppetlabs-mysql/pull/1221) ([rick-pri](https://github.com/rick-pri))
## [v10.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.1.0) (2019-07-30)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.0.0...v10.1.0)
### Added
- Allow backup::mysqldump::time to accept monthday, month, weekday [\#1214](https://github.com/puppetlabs/puppetlabs-mysql/pull/1214) ([malakai97](https://github.com/malakai97))
## [v10.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.0.0) (2019-06-26)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v9.1.0...v10.0.0)
### Added
- add support for rh-mariadb102 [\#1209](https://github.com/puppetlabs/puppetlabs-mysql/pull/1209) ([martin-schlossarek](https://github.com/martin-schlossarek))
- Freebsd compat [\#1208](https://github.com/puppetlabs/puppetlabs-mysql/pull/1208) ([kapouik](https://github.com/kapouik))
### Fixed
- FM-7982 - update provisioner to docker\_exp [\#1205](https://github.com/puppetlabs/puppetlabs-mysql/pull/1205) ([lionce](https://github.com/lionce))
## [v9.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v9.1.0) (2019-06-10)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v9.0.0...v9.1.0)
### Added
- Add option to specify $backupdir as a symlink target, for use with dm… [\#1200](https://github.com/puppetlabs/puppetlabs-mysql/pull/1200) ([comport3](https://github.com/comport3))
- \(FM-8029\) Add RedHat 8 support [\#1199](https://github.com/puppetlabs/puppetlabs-mysql/pull/1199) ([eimlav](https://github.com/eimlav))
- Allow own Xtrabackup script [\#1189](https://github.com/puppetlabs/puppetlabs-mysql/pull/1189) ([SaschaDoering](https://github.com/SaschaDoering))
- Litmus conversion [\#1175](https://github.com/puppetlabs/puppetlabs-mysql/pull/1175) ([pmcmaw](https://github.com/pmcmaw))
### Fixed
- \(MODULES-6875,MODULES-7487\) - Fix mariadb mysql\_user password idempotency [\#1195](https://github.com/puppetlabs/puppetlabs-mysql/pull/1195) ([alexjfisher](https://github.com/alexjfisher))
## [v9.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v9.0.0) (2019-05-21)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.1.0...v9.0.0)
### Changed
- pdksync - \(MODULES-8444\) - Raise lower Puppet bound [\#1184](https://github.com/puppetlabs/puppetlabs-mysql/pull/1184) ([david22swan](https://github.com/david22swan))
### Added
- Make incremental backups deactivable [\#1188](https://github.com/puppetlabs/puppetlabs-mysql/pull/1188) ([SaschaDoering](https://github.com/SaschaDoering))
- Allow multiple backupmethods [\#1187](https://github.com/puppetlabs/puppetlabs-mysql/pull/1187) ([SaschaDoering](https://github.com/SaschaDoering))
### Fixed
- Fix the contribution guide URL [\#1190](https://github.com/puppetlabs/puppetlabs-mysql/pull/1190) ([mauricemeyer](https://github.com/mauricemeyer))
- \(MODULES-8886\) Revert removal of deepmerge function [\#1181](https://github.com/puppetlabs/puppetlabs-mysql/pull/1181) ([eimlav](https://github.com/eimlav))
- Fixed Changelog links for 8.1.0 [\#1180](https://github.com/puppetlabs/puppetlabs-mysql/pull/1180) ([mauricemeyer](https://github.com/mauricemeyer))
## [8.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.1.0) (2019-04-03)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.0.1...8.1.0)
### Added
- Rotate option for xtrabackup script [\#1176](https://github.com/puppetlabs/puppetlabs-mysql/pull/1176) ([elfranne](https://github.com/elfranne))
- Add support for dynamic backupmethods/mariabackup [\#1171](https://github.com/puppetlabs/puppetlabs-mysql/pull/1171) ([danquack](https://github.com/danquack))
### Fixed
- \(MODULES-6627\) Remove unused --host flags from mysqlcaller [\#1174](https://github.com/puppetlabs/puppetlabs-mysql/pull/1174) ([david22swan](https://github.com/david22swan))
- Set correct packagename for ruby\_mysql on Ubuntu 18.04 [\#1163](https://github.com/puppetlabs/puppetlabs-mysql/pull/1163) ([datty](https://github.com/datty))
- \[MODULES-8779\] Set proper python\_package\_name for RHEL/CentOS 8 [\#1161](https://github.com/puppetlabs/puppetlabs-mysql/pull/1161) ([javierpena](https://github.com/javierpena))
- fix install ordering for innodb data size [\#1160](https://github.com/puppetlabs/puppetlabs-mysql/pull/1160) ([fe80](https://github.com/fe80))
## [8.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.1) (2019-03-20)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.0.0...8.0.1)
### Fixed
- \(MODULES-8684\) - Removing private tags from Puppet Types [\#1170](https://github.com/puppetlabs/puppetlabs-mysql/pull/1170) ([david22swan](https://github.com/david22swan))
## [8.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.0) (2019-01-18)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/7.0.0...8.0.0)
@ -75,7 +199,7 @@ All notable changes to this project will be documented in this file. The format
- \(FM-5985\) - Addition of support for Ubuntu 18.04 to mysql [\#1104](https://github.com/puppetlabs/puppetlabs-mysql/pull/1104) ([david22swan](https://github.com/david22swan))
- \(MODULES-7439\) - Implementing beaker-testmode\_switcher [\#1095](https://github.com/puppetlabs/puppetlabs-mysql/pull/1095) ([pmcmaw](https://github.com/pmcmaw))
- Support for optional\_\_args and prescript to mysqldump backup provider [\#1083](https://github.com/puppetlabs/puppetlabs-mysql/pull/1083) ([eputnam](https://github.com/eputnam))
- Allow empty user passwords [\#1075](https://github.com/puppetlabs/puppetlabs-mysql/pull/1075) ([disappear89](https://github.com/disappear89))
- Allow empty user passwords [\#1075](https://github.com/puppetlabs/puppetlabs-mysql/pull/1075) ([ThoTischner](https://github.com/ThoTischner))
- Add user tls\_options and grant options to mysql::db [\#1065](https://github.com/puppetlabs/puppetlabs-mysql/pull/1065) ([edestecd](https://github.com/edestecd))
- Use puppet4 functions-api [\#1044](https://github.com/puppetlabs/puppetlabs-mysql/pull/1044) ([juliantodt](https://github.com/juliantodt))
- Replaced 'DROP USER' with 'DROP USER IF EXISTS' [\#942](https://github.com/puppetlabs/puppetlabs-mysql/pull/942) ([libertamohamed](https://github.com/libertamohamed))
@ -983,4 +1107,7 @@ configuration variables.
[5.0.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/4.0.1...5.0.0
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

@ -0,0 +1,2 @@
# Setting ownership to the modules team
* @puppetlabs/modules

@ -17,23 +17,19 @@ ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')
group :development do
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-lint-i18n", require: false
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
end
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "beaker-testmode_switcher", require: false
gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-lint-i18n", require: false
gem "github_changelog_generator", require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
end
puppet_version = ENV['PUPPET_GEM_VERSION']

@ -1,3 +1,199 @@
# Change log
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).
## [v10.2.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.2.1) (2019-10-30)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.2.0...v10.2.1)
### Fixed
- Fix mysql::sql task error message [\#1243](https://github.com/puppetlabs/puppetlabs-mysql/pull/1243) ([alexjfisher](https://github.com/alexjfisher))
- Fix xtrabackup regression introduced in \#1207 [\#1242](https://github.com/puppetlabs/puppetlabs-mysql/pull/1242) ([fraenki](https://github.com/fraenki))
- Repair mysql\_grant docs and diagnostics [\#1237](https://github.com/puppetlabs/puppetlabs-mysql/pull/1237) ([qha](https://github.com/qha))
## [v10.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.2.0) (2019-09-24)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.1.0...v10.2.0)
### Added
- FM-8406 add support on Debian10 [\#1230](https://github.com/puppetlabs/puppetlabs-mysql/pull/1230) ([lionce](https://github.com/lionce))
- Make backup success file path configurable [\#1207](https://github.com/puppetlabs/puppetlabs-mysql/pull/1207) ([HT43-bqxFqB](https://github.com/HT43-bqxFqB))
### Fixed
- No package under FreeBSD [\#1227](https://github.com/puppetlabs/puppetlabs-mysql/pull/1227) ([jas01](https://github.com/jas01))
- Fix group on FreeBSD [\#1226](https://github.com/puppetlabs/puppetlabs-mysql/pull/1226) ([jas01](https://github.com/jas01))
- Don't run fact when you can't find mysqld [\#1224](https://github.com/puppetlabs/puppetlabs-mysql/pull/1224) ([jstewart612](https://github.com/jstewart612))
- Bugfix on Debian 9 : ruby\_package\_name must be ruby-mysql2 [\#1223](https://github.com/puppetlabs/puppetlabs-mysql/pull/1223) ([leopoiroux](https://github.com/leopoiroux))
- Fix errors for /bin/sh with the xtrabackup cron [\#1222](https://github.com/puppetlabs/puppetlabs-mysql/pull/1222) ([baldurmen](https://github.com/baldurmen))
- Fix/fix dependency issue in freebsd with log error file creation from 10.0.0 [\#1221](https://github.com/puppetlabs/puppetlabs-mysql/pull/1221) ([rick-pri](https://github.com/rick-pri))
## [v10.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.1.0) (2019-07-30)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v10.0.0...v10.1.0)
### Added
- Allow backup::mysqldump::time to accept monthday, month, weekday [\#1214](https://github.com/puppetlabs/puppetlabs-mysql/pull/1214) ([malakai97](https://github.com/malakai97))
## [v10.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v10.0.0) (2019-06-26)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v9.1.0...v10.0.0)
### Added
- add support for rh-mariadb102 [\#1209](https://github.com/puppetlabs/puppetlabs-mysql/pull/1209) ([martin-schlossarek](https://github.com/martin-schlossarek))
- Freebsd compat [\#1208](https://github.com/puppetlabs/puppetlabs-mysql/pull/1208) ([kapouik](https://github.com/kapouik))
### Fixed
- FM-7982 - update provisioner to docker\_exp [\#1205](https://github.com/puppetlabs/puppetlabs-mysql/pull/1205) ([lionce](https://github.com/lionce))
## [v9.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v9.1.0) (2019-06-10)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/v9.0.0...v9.1.0)
### Added
- Add option to specify $backupdir as a symlink target, for use with dm… [\#1200](https://github.com/puppetlabs/puppetlabs-mysql/pull/1200) ([comport3](https://github.com/comport3))
- \(FM-8029\) Add RedHat 8 support [\#1199](https://github.com/puppetlabs/puppetlabs-mysql/pull/1199) ([eimlav](https://github.com/eimlav))
- Allow own Xtrabackup script [\#1189](https://github.com/puppetlabs/puppetlabs-mysql/pull/1189) ([SaschaDoering](https://github.com/SaschaDoering))
- Litmus conversion [\#1175](https://github.com/puppetlabs/puppetlabs-mysql/pull/1175) ([pmcmaw](https://github.com/pmcmaw))
### Fixed
- \(MODULES-6875,MODULES-7487\) - Fix mariadb mysql\_user password idempotency [\#1195](https://github.com/puppetlabs/puppetlabs-mysql/pull/1195) ([alexjfisher](https://github.com/alexjfisher))
## [v9.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/v9.0.0) (2019-05-21)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.1.0...v9.0.0)
### Changed
- pdksync - \(MODULES-8444\) - Raise lower Puppet bound [\#1184](https://github.com/puppetlabs/puppetlabs-mysql/pull/1184) ([david22swan](https://github.com/david22swan))
### Added
- Make incremental backups deactivable [\#1188](https://github.com/puppetlabs/puppetlabs-mysql/pull/1188) ([SaschaDoering](https://github.com/SaschaDoering))
- Allow multiple backupmethods [\#1187](https://github.com/puppetlabs/puppetlabs-mysql/pull/1187) ([SaschaDoering](https://github.com/SaschaDoering))
### Fixed
- Fix the contribution guide URL [\#1190](https://github.com/puppetlabs/puppetlabs-mysql/pull/1190) ([mauricemeyer](https://github.com/mauricemeyer))
- \(MODULES-8886\) Revert removal of deepmerge function [\#1181](https://github.com/puppetlabs/puppetlabs-mysql/pull/1181) ([eimlav](https://github.com/eimlav))
- Fixed Changelog links for 8.1.0 [\#1180](https://github.com/puppetlabs/puppetlabs-mysql/pull/1180) ([mauricemeyer](https://github.com/mauricemeyer))
## [8.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.1.0) (2019-04-03)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.0.1...8.1.0)
### Added
- Rotate option for xtrabackup script [\#1176](https://github.com/puppetlabs/puppetlabs-mysql/pull/1176) ([elfranne](https://github.com/elfranne))
- Add support for dynamic backupmethods/mariabackup [\#1171](https://github.com/puppetlabs/puppetlabs-mysql/pull/1171) ([danquack](https://github.com/danquack))
### Fixed
- \(MODULES-6627\) Remove unused --host flags from mysqlcaller [\#1174](https://github.com/puppetlabs/puppetlabs-mysql/pull/1174) ([david22swan](https://github.com/david22swan))
- Set correct packagename for ruby\_mysql on Ubuntu 18.04 [\#1163](https://github.com/puppetlabs/puppetlabs-mysql/pull/1163) ([datty](https://github.com/datty))
- \[MODULES-8779\] Set proper python\_package\_name for RHEL/CentOS 8 [\#1161](https://github.com/puppetlabs/puppetlabs-mysql/pull/1161) ([javierpena](https://github.com/javierpena))
- fix install ordering for innodb data size [\#1160](https://github.com/puppetlabs/puppetlabs-mysql/pull/1160) ([fe80](https://github.com/fe80))
## [8.0.1](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.1) (2019-03-20)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/8.0.0...8.0.1)
### Fixed
- \(MODULES-8684\) - Removing private tags from Puppet Types [\#1170](https://github.com/puppetlabs/puppetlabs-mysql/pull/1170) ([david22swan](https://github.com/david22swan))
## [8.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/8.0.0) (2019-01-18)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/7.0.0...8.0.0)
### Changed
- \(MODULES-8193\) - Removal of inbuilt deepmerge and dirname functions [\#1145](https://github.com/puppetlabs/puppetlabs-mysql/pull/1145) ([david22swan](https://github.com/david22swan))
### Added
- \(MODULES-3539\) Allow @ in username [\#1155](https://github.com/puppetlabs/puppetlabs-mysql/pull/1155) ([Fogelholk](https://github.com/Fogelholk))
- \(MODULES-8144\) - Add support for SLES 15 [\#1146](https://github.com/puppetlabs/puppetlabs-mysql/pull/1146) ([eimlav](https://github.com/eimlav))
- Added support for RHSCL mysql versions and support for .mylogin.cnf for MySQL 5.6.6+ [\#1061](https://github.com/puppetlabs/puppetlabs-mysql/pull/1061) ([DJMuggs](https://github.com/DJMuggs))
### Fixed
- \(MODULES-8193\) - Wrapper methods created for inbuilt 4.x functions [\#1151](https://github.com/puppetlabs/puppetlabs-mysql/pull/1151) ([david22swan](https://github.com/david22swan))
- pdksync - \(FM-7655\) Fix rubygems-update for ruby \< 2.3 [\#1150](https://github.com/puppetlabs/puppetlabs-mysql/pull/1150) ([tphoney](https://github.com/tphoney))
- Add includedir for Gentoo [\#1147](https://github.com/puppetlabs/puppetlabs-mysql/pull/1147) ([baurmatt](https://github.com/baurmatt))
- add mysql\_native\_password for mariadb 10.2 in password\_hash [\#1117](https://github.com/puppetlabs/puppetlabs-mysql/pull/1117) ([mlk-89](https://github.com/mlk-89))
- Removing query\_cache ops that are no longer supported in MySQL \>= 8.0 [\#1107](https://github.com/puppetlabs/puppetlabs-mysql/pull/1107) ([ernstae](https://github.com/ernstae))
## [7.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/7.0.0) (2018-10-25)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.2.0...7.0.0)
### Changed
- \(MODULES-6923\) remove staging module [\#1115](https://github.com/puppetlabs/puppetlabs-mysql/pull/1115) ([tphoney](https://github.com/tphoney))
### Added
- \(MODULES-7857\) Support user creation on galera [\#1130](https://github.com/puppetlabs/puppetlabs-mysql/pull/1130) ([MaxFedotov](https://github.com/MaxFedotov))
- MySQL 8 compatibility in user management [\#1092](https://github.com/puppetlabs/puppetlabs-mysql/pull/1092) ([zpetr](https://github.com/zpetr))
### Fixed
- \(MODULES-7487\) Check authentication string for user password on MariaDB 10.2.16+ [\#1135](https://github.com/puppetlabs/puppetlabs-mysql/pull/1135) ([gguillotte](https://github.com/gguillotte))
## [6.2.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.2.0) (2018-09-27)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.1.0...6.2.0)
### Added
- pdksync - \(MODULES-6805\) metadata.json shows support for puppet 6 [\#1127](https://github.com/puppetlabs/puppetlabs-mysql/pull/1127) ([tphoney](https://github.com/tphoney))
### Fixed
- \(maint\) - Change versioning comparison [\#1123](https://github.com/puppetlabs/puppetlabs-mysql/pull/1123) ([eimlav](https://github.com/eimlav))
## [6.1.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.1.0) (2018-09-13)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/6.0.0...6.1.0)
### Fixed
- pdksync - \(MODULES-7705\) - Bumping stdlib dependency from \< 5.0.0 to \< 6.0.0 [\#1114](https://github.com/puppetlabs/puppetlabs-mysql/pull/1114) ([pmcmaw](https://github.com/pmcmaw))
- \(MODULES-6981\) Do not try to read ~root/.my.cnf when calling "mysqld -V" [\#1063](https://github.com/puppetlabs/puppetlabs-mysql/pull/1063) ([simondeziel](https://github.com/simondeziel))
## [6.0.0](https://github.com/puppetlabs/puppetlabs-mysql/tree/6.0.0) (2018-08-01)
[Full Changelog](https://github.com/puppetlabs/puppetlabs-mysql/compare/5.4.0...6.0.0)
### Changed
- \[FM-6962\] Removal of unsupported OS from mysql [\#1086](https://github.com/puppetlabs/puppetlabs-mysql/pull/1086) ([david22swan](https://github.com/david22swan))
### Added
- \(FM-5985\) - Addition of support for Ubuntu 18.04 to mysql [\#1104](https://github.com/puppetlabs/puppetlabs-mysql/pull/1104) ([david22swan](https://github.com/david22swan))
- \(MODULES-7439\) - Implementing beaker-testmode\_switcher [\#1095](https://github.com/puppetlabs/puppetlabs-mysql/pull/1095) ([pmcmaw](https://github.com/pmcmaw))
- Support for optional\_\_args and prescript to mysqldump backup provider [\#1083](https://github.com/puppetlabs/puppetlabs-mysql/pull/1083) ([eputnam](https://github.com/eputnam))
- Allow empty user passwords [\#1075](https://github.com/puppetlabs/puppetlabs-mysql/pull/1075) ([ThoTischner](https://github.com/ThoTischner))
- Add user tls\_options and grant options to mysql::db [\#1065](https://github.com/puppetlabs/puppetlabs-mysql/pull/1065) ([edestecd](https://github.com/edestecd))
- Use puppet4 functions-api [\#1044](https://github.com/puppetlabs/puppetlabs-mysql/pull/1044) ([juliantodt](https://github.com/juliantodt))
- Replaced 'DROP USER' with 'DROP USER IF EXISTS' [\#942](https://github.com/puppetlabs/puppetlabs-mysql/pull/942) ([libertamohamed](https://github.com/libertamohamed))
### Fixed
- \(MODULES-7353\) Enable service for Debian 9 [\#1094](https://github.com/puppetlabs/puppetlabs-mysql/pull/1094) ([david22swan](https://github.com/david22swan))
- Update locales test for Debian 9 [\#1091](https://github.com/puppetlabs/puppetlabs-mysql/pull/1091) ([HelenCampbell](https://github.com/HelenCampbell))
- \[FM-7045\] Fix to allow Debian 9 test's to run clean [\#1088](https://github.com/puppetlabs/puppetlabs-mysql/pull/1088) ([david22swan](https://github.com/david22swan))
- \(MODULES-7198\) Fix DROP USER IF EXISTS on mariadb [\#1082](https://github.com/puppetlabs/puppetlabs-mysql/pull/1082) ([hunner](https://github.com/hunner))
## 5.4.0
### Added
@ -892,3 +1088,6 @@ configuration variables.
[5.2.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/5.1.0...5.2.0
[5.1.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/5.0.0...5.1.0
[5.0.0]:https://github.com/puppetlabs/puppetlabs-mysql/compare/4.0.1...5.0.0
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

@ -1,6 +0,0 @@
## Maintenance
Maintainers:
- Puppet Forge Modules Team `forge-modules |at| puppet |dot| com`
Tickets: https://tickets.puppet.com/browse/MODULES. Make sure to set component to `mysql`.

@ -38,10 +38,14 @@ To customize options, such as the root password or `/etc/my.cnf` settings, you m
class { '::mysql::server':
root_password => 'strongpassword',
remove_default_accounts => true,
restart => true,
override_options => $override_options
}
```
Nota bene: Configuration changes will only be applied to the running
MySQL server if you pass true as restart to mysql::server.
See [**Customize Server Options**](#customize-server-options) below for examples of the hash structure for $override_options.
## Usage
@ -181,7 +185,7 @@ If required, the password can also be an empty string to allow connections witho
This example shows how to do a minimal installation of a Percona server on a
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.
This usage has been tested on Puppet 4.4 / CentOS 7 / Percona Server 5.7.
This usage has been tested on Puppet 4.4, 5.5 and 6.3.0 / CentOS 7 / Percona Server 5.7.
**Note:** The installation of the yum repository is not part of this package
and is here only to show a full example of how you can install.
@ -189,15 +193,14 @@ and is here only to show a full example of how you can install.
```puppet
yumrepo { 'percona':
descr => 'CentOS $releasever - Percona',
baseurl => 'http://repo.percona.com/centos/$releasever/os/$basearch/',
gpgkey => 'http://www.percona.com/downloads/percona-release/RPM-GPG-KEY-percona',
baseurl => 'http://repo.percona.com/percona/yum/release/$releasever/RPMS/$basearch',
gpgkey => 'https://repo.percona.com/yum/PERCONA-PACKAGING-KEY',
enabled => 1,
gpgcheck => 1,
}
class {'mysql::server':
package_name => 'Percona-Server-server-57',
package_ensure => '5.7.11-4.1.el7',
service_name => 'mysql',
config_file => '/etc/my.cnf',
includedir => '/etc/my.cnf.d',
@ -216,18 +219,15 @@ class {'mysql::server':
# Note: Installing Percona-Server-server-57 also installs Percona-Server-client-57.
# This shows how to install the Percona MySQL client on its own
class {'mysql::client':
package_name => 'Percona-Server-client-57',
package_ensure => '5.7.11-4.1.el7',
package_name => 'Percona-Server-client-57'
}
# These packages are normally installed along with Percona-Server-server-57
# If you needed to install the bindings, however, you could do so with this code
class { 'mysql::bindings':
client_dev_package_name => 'Percona-Server-shared-57',
client_dev_package_ensure => '5.7.11-4.1.el7',
client_dev => true,
daemon_dev_package_name => 'Percona-Server-devel-57',
daemon_dev_package_ensure => '5.7.11-4.1.el7',
daemon_dev => true,
perl_enable => true,
perl_package_name => 'perl-DBD-MySQL',
@ -421,7 +421,7 @@ Plugins can be installed by using the `mysql_plugin` defined type. See `examples
* `mysql::client::install`: Installs MySQL client.
* `mysql::backup::mysqldump`: Implements mysqldump backups.
* `mysql::backup::mysqlbackup`: Implements backups with Oracle MySQL Enterprise Backup.
* `mysql::backup::xtrabackup`: Implements backups with XtraBackup from Percona.
* `mysql::backup::xtrabackup`: Implements backups with XtraBackup from Percona or Mariabackup.
### Parameters
@ -522,11 +522,13 @@ For an extensive list of supported operating systems, see [metadata.json](https:
## Development
We are experimenting with a new tool for running acceptance tests. Its name is [puppet_litmus](https://github.com/puppetlabs/puppet_litmus) this replaces beaker as the test runner. To run the acceptance tests follow the instructions from this point [here](https://github.com/puppetlabs/puppet_litmus/wiki/Tutorial:-use-Litmus-to-execute-acceptance-tests-with-a-sample-module-(MoTD)#install-the-necessary-gems-for-the-module).
Puppet modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can't access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.
We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.
Check out our the complete [module contribution guide](https://docs.puppetlabs.com/forge/contributing.html).
Check out our the complete [module contribution guide](https://puppet.com/docs/puppet/latest/contributing.html).
### Authors

@ -18,7 +18,7 @@ _Private Classes_
* `mysql::backup::mysqlbackup`: Manage the mysqlbackup client.
* `mysql::backup::mysqldump`: "Provider" for mysqldump
* `mysql::backup::xtrabackup`: "Provider" for Percona XtraBackup
* `mysql::backup::xtrabackup`: "Provider" for Percona XtraBackup/MariaBackup
* `mysql::bindings::client_dev`: Private class for installing client development bindings
* `mysql::bindings::daemon_dev`: Private class for installing daemon development bindings
* `mysql::bindings::java`: Private class for installing java language bindings.
@ -45,25 +45,22 @@ _Private Classes_
_Public Resource types_
* [`mysql_grant`](#mysql_grant): @summary Manage a MySQL user's rights.
* [`mysql_plugin`](#mysql_plugin): Manage MySQL plugins.
* [`mysql_user`](#mysql_user): @summary Manage a MySQL user. This includes management of users password as well as privileges.
_Private Resource types_
* `mysql_database`: Manage a MySQL database.
* `mysql_datadir`: Manage MySQL datadirs with mysql_install_db OR mysqld (5.7.6 and above).
* `mysql_grant`: Manage a MySQL user's rights.
* `mysql_user`: Manage a MySQL user. This includes management of users password as well as privileges.
**Functions**
* [`mysql::normalise_and_deepmerge`](#mysqlnormalise_and_deepmerge): Recursively merges two or more hashes together, normalises keys with differing use of dashesh and underscores,
then returns the resulting hash.
* [`mysql::password`](#mysqlpassword): Hash a string as mysql's "PASSWORD()" function would do it
* [`mysql::strip_hash`](#mysqlstrip_hash): When given a hash this function strips out all blank entries.
* [`mysql_password`](#mysql_password): A wrapper for the 4.x function 'mysql::password' to bridge the gap between
it and the 3.x function 'mysql_password'.
* [`mysql_password`](#mysql_password): Hash a string as mysql's "PASSWORD()" function would do it
* [`mysql_strip_hash`](#mysql_strip_hash): A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
it and the 3.x function 'mysql_strip_hash'.
* [`mysql_strip_hash`](#mysql_strip_hash): TEMPORARY FUNCTION: EXPIRES 2014-03-10 When given a hash this function strips out all blank entries.
**Tasks**
@ -655,6 +652,11 @@ class { 'mysql::server::backup':
backuppassword => 'mypassword',
backupdir => '/tmp/backups',
}
class { 'mysql::server::backup':
backupmethod => 'mariabackup',
provider => 'xtrabackup',
backupdir => '/tmp/backups',
}
```
#### Parameters
@ -707,7 +709,7 @@ Data type: `Any`
Group owner for the backup directory. This parameter is passed directly to the file resource.
Default value: 'root'
Default value: $mysql::params::root_group
##### `backupcompress`
@ -717,6 +719,22 @@ Whether or not to compress the backup (when using the mysqldump provider)
Default value: `true`
##### `backupmethod`
Data type: `Any`
The execution binary for backing up. ex. mysqldump, xtrabackup, mariabackup
Default value: `undef`
##### `backup_success_file_path`
Data type: `Any`
Specify a path where upon successfull backup a file should be created for checking purposes.
Default value: '/tmp/mysqlbackup_success'
##### `backuprotate`
Data type: `Any`
@ -745,7 +763,7 @@ Default value: `false`
Data type: `Any`
Databases to backup (if using xtrabackup provider).
Databases to backup (required if using xtrabackup provider). By default `[]` will back up all databases.
Default value: []
@ -1050,6 +1068,51 @@ Default value: $mysql::params::exec_path
## Resource types
### mysql_grant
@summary
Manage a MySQL user's rights.
#### Properties
The following properties are available in the `mysql_grant` type.
##### `ensure`
Valid values: present, absent
The basic property that the resource should be in.
Default value: present
##### `privileges`
Privileges for user
##### `table`
Valid values: %r{.*\..*}, %r{^[0-9a-zA-Z$_]*@[\w%\.:\-/]*$}
Table to apply privileges to.
##### `user`
User to operate on.
##### `options`
Options to grant.
#### Parameters
The following parameters are available in the `mysql_grant` type.
##### `name`
namevar
Name to describe the grant.
### mysql_plugin
Manage MySQL plugins.
@ -1092,76 +1155,133 @@ namevar
The name of the MySQL plugin to manage.
## Functions
### mysql_user
### mysql::password
@summary
Manage a MySQL user. This includes management of users password as well as privileges.
Type: Ruby 4.x API
#### Properties
Hash a string as mysql's "PASSWORD()" function would do it
The following properties are available in the `mysql_user` type.
#### `mysql::password(String $password)`
##### `ensure`
The mysql::password function.
Valid values: present, absent
Returns: `String` hash
The mysql password hash from the clear text password.
The basic property that the resource should be in.
##### `password`
Default value: present
Data type: `String`
##### `password_hash`
Plain text password.
Valid values: %r{\w*}
### mysql::strip_hash
The password hash of the user. Use mysql_password() for creating such a hash.
Type: Ruby 4.x API
##### `plugin`
When given a hash this function strips out all blank entries.
Valid values: %r{\w+}
#### `mysql::strip_hash(Hash $hash)`
The authentication plugin of the user.
The mysql::strip_hash function.
##### `max_user_connections`
Returns: `Hash` hash
The given hash with all blank entries removed
Valid values: %r{\d+}
##### `hash`
Max concurrent connections for the user. 0 means no (or global) limit.
Data type: `Hash`
##### `max_connections_per_hour`
Hash to be stripped
Valid values: %r{\d+}
### mysql_password
Max connections per hour for the user. 0 means no (or global) limit.
##### `max_queries_per_hour`
Valid values: %r{\d+}
Max queries per hour for the user. 0 means no (or global) limit.
##### `max_updates_per_hour`
Valid values: %r{\d+}
Max updates per hour for the user. 0 means no (or global) limit.
##### `tls_options`
Options to that set the TLS-related REQUIRE attributes for the user.
#### Parameters
The following parameters are available in the `mysql_user` type.
##### `name`
namevar
The name of the user. This uses the 'username@hostname' or username@hostname.
## Functions
### mysql::normalise_and_deepmerge
Type: Ruby 4.x API
A wrapper for the 4.x function 'mysql::password' to bridge the gap between
it and the 3.x function 'mysql_password'.
- When there is a duplicate key that is a hash, they are recursively merged.
- When there is a duplicate key that is not a hash, the key in the rightmost hash will "win."
- When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), the rightmost style will win.
#### `mysql_password(String $password)`
#### Examples
The mysql_password function.
#####
Returns: `String` The mysql password hash from the 4.x function mysql::password.
```puppet
$hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
$hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } }
$merged_hash = mysql::normalise_and_deepmerge($hash1, $hash2)
# The resulting hash is equivalent to:
# $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } }
```
##### `password`
#### `mysql::normalise_and_deepmerge(Any *$args)`
Data type: `String`
- When there is a duplicate key that is a hash, they are recursively merged.
- When there is a duplicate key that is not a hash, the key in the rightmost hash will "win."
- When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), the rightmost style will win.
Plain text password.
Returns: `Any`
### mysql_password
##### Examples
Type: Ruby 3.x API
######
```puppet
$hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
$hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } }
$merged_hash = mysql::normalise_and_deepmerge($hash1, $hash2)
# The resulting hash is equivalent to:
# $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } }
```
##### `*args`
Data type: `Any`
### mysql::password
Type: Ruby 4.x API
Hash a string as mysql's "PASSWORD()" function would do it
#### `mysql_password(String $password)`
#### `mysql::password(String $password)`
The mysql_password function.
The mysql::password function.
Returns: `String` the mysql password hash from the clear text password.
Returns: `String` hash
The mysql password hash from the clear text password.
##### `password`
@ -1169,18 +1289,17 @@ Data type: `String`
Plain text password.
### mysql_strip_hash
### mysql::strip_hash
Type: Ruby 4.x API
A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
it and the 3.x function 'mysql_strip_hash'.
When given a hash this function strips out all blank entries.
#### `mysql_strip_hash(Hash $hash)`
#### `mysql::strip_hash(Hash $hash)`
The mysql_strip_hash function.
The mysql::strip_hash function.
Returns: `Hash` hash
Returns: `Hash` hash
The given hash with all blank entries removed
##### `hash`
@ -1189,19 +1308,23 @@ Data type: `Hash`
Hash to be stripped
### mysql_strip_hash
### mysql_password
Type: Ruby 3.x API
TEMPORARY FUNCTION: EXPIRES 2014-03-10
When given a hash this function strips out all blank entries.
Hash a string as mysql's "PASSWORD()" function would do it
#### `mysql_strip_hash()`
#### `mysql_password(String $password)`
TEMPORARY FUNCTION: EXPIRES 2014-03-10
When given a hash this function strips out all blank entries.
The mysql_password function.
Returns: `Any`
Returns: `String` the mysql password hash from the clear text password.
##### `password`
Data type: `String`
Plain text password.
## Tasks

@ -1,3 +1,4 @@
require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'
require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
@ -15,15 +16,24 @@ end
def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['name']
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
returnVal = nil
returnVal ||= begin
metadata_source = JSON.load(File.read('metadata.json'))['source']
metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
metadata_source_match && metadata_source_match[1]
end
raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
end
def changelog_future_release
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = JSON.load(File.read('metadata.json'))['version']
returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator future_release:#{returnVal}"
returnVal

@ -1,15 +1,16 @@
{
"CHANGELOG.md": "aaeb2283799a520c3f96648850e2a604",
"CHANGELOG.md": "51ff4a8d514e13206df28c486983c884",
"CODEOWNERS": "366aefdc1424442b8f864528c2e0db1d",
"CONTRIBUTING.md": "4d17f3c942e7c93d1577cc4438a231e4",
"Gemfile": "4f7f09c68dcb8976fcf410726373a72c",
"HISTORY.md": "202fb76908e67e272549113e70da44a9",
"Gemfile": "40f28a9754cf13fd15f4b8e6897c0ded",
"HISTORY.md": "6bc907f23fa327dbe21873029acc6272",
"LICENSE": "3b83ef96387f14655fc854ddc3c6bd57",
"MAINTAINERS.md": "d1a8a0cb1736b23f3143b685e0d034b0",
"NOTICE": "61151e454f47a0df587642c792385533",
"README.md": "31adf87ad5feaba9ef249da3df075dd8",
"REFERENCE.md": "8a0435450fcb0b10a8966c8ef7b513e0",
"Rakefile": "b737fd2ba1682111324e61da2b8d53b0",
"README.md": "10b30ee88a990f896376c3d2862b146f",
"REFERENCE.md": "ccfef8f267a428d5b77c5b76a16b61b7",
"Rakefile": "013397feeb5293cbfc9bdcbd51a02b42",
"TODO": "88ca4024a37992b46c34cb46e4ac39e6",
"distelli-manifest.yml": "5ed218d0bcbbd6bb9b8f197f836fc446",
"examples/backup.pp": "a61c6f34f153a323209faf25948737f5",
"examples/bindings.pp": "35a8387f5c55fa2e479c513a67918674",
"examples/java.pp": "0ad9de4f9f2c049642bcf08124757085",
@ -25,31 +26,29 @@
"examples/server/config.pp": "659b7c40e9b55634721b3c33a8c6da98",
"examples/server.pp": "72e22552a95b9a5e4a349dbfc13639dc",
"lib/facter/mysql_server_id.rb": "8074e28063136191d064de5bbd23d823",
"lib/facter/mysql_version.rb": "9e8e89de386bbbd74bac1c24c388ed61",
"lib/facter/mysqld_version.rb": "a865c82a1bbe4fc49998d17038eaaa11",
"lib/facter/mysql_version.rb": "7f98eab71b47bf3546385d4f944a8d34",
"lib/facter/mysqld_version.rb": "d4db7620b989d251a2c0223b720da1c9",
"lib/puppet/functions/mysql/normalise_and_deepmerge.rb": "4e5b3d3680891be8dd421abc97057562",
"lib/puppet/functions/mysql/password.rb": "5da041193b56f44dd4c43141433ca495",
"lib/puppet/functions/mysql/strip_hash.rb": "014e9cce7d1995145fa49242d6a1430c",
"lib/puppet/functions/mysql_password.rb": "4439c6090a76e6882355a80352ab34b4",
"lib/puppet/functions/mysql_strip_hash.rb": "e977e2daed0446bfb1b06951292125bc",
"lib/puppet/parser/functions/mysql_password.rb": "c4d522919ce8d270a5d3d2ccf060ecd1",
"lib/puppet/parser/functions/mysql_strip_hash.rb": "59f90ce7c6a5f96c3565ba2ef12a6e7e",
"lib/puppet/provider/mysql.rb": "287b9ef1f41ced3630348bd8ee098853",
"lib/puppet/provider/mysql.rb": "383364bcdbb716bb30e6984e8bb9f1fa",
"lib/puppet/provider/mysql_database/mysql.rb": "12e6bfef70486ed4d8a4e731bfde89fa",
"lib/puppet/provider/mysql_datadir/mysql.rb": "aa72daf1732dadd9d5caa6c6ff696414",
"lib/puppet/provider/mysql_datadir/mysql.rb": "441a199d4239be01eaebcd529d1c3842",
"lib/puppet/provider/mysql_grant/mysql.rb": "e0a96951629bc906d45c8bc73f0d16d5",
"lib/puppet/provider/mysql_plugin/mysql.rb": "d0043d2fec34ab9d9839ecb2f5e6f494",
"lib/puppet/provider/mysql_user/mysql.rb": "9ce968d7a78b0119e3bdfeb8c284517f",
"lib/puppet/provider/mysql_user/mysql.rb": "4466d0241feb09fc7e60911fa068ba89",
"lib/puppet/type/mysql_database.rb": "a52d622db5cb4e9978c57d445e7d63f7",
"lib/puppet/type/mysql_datadir.rb": "003e20fbccdfabbf46e62dfbfc41781b",
"lib/puppet/type/mysql_grant.rb": "2d9bdca037cd3db847f840ffc807817f",
"lib/puppet/type/mysql_grant.rb": "70c9d08f7a1d076d538d93b25ef5a187",
"lib/puppet/type/mysql_plugin.rb": "5786a52bf1ca04a9300831add3f4dbad",
"lib/puppet/type/mysql_user.rb": "0886e73a6ecfe8838196fcaf7e1907a4",
"lib/puppet/type/mysql_user.rb": "86d77c52c8bab20a7b5e2a84e1220467",
"locales/config.yaml": "2fa67bcbae3c1f47b447359558142bb4",
"locales/ja/puppetlabs-mysql.po": "2cf26b43a97d4444f0af6e542b140a84",
"locales/puppetlabs-mysql.pot": "0bc1d574fc470daa825d2052b901f1c2",
"manifests/backup/mysqlbackup.pp": "9899644b59b3c4fffa1c5fcaa9519654",
"manifests/backup/mysqldump.pp": "6e1650e5af995c9aad06d905f9e9884e",
"manifests/backup/xtrabackup.pp": "735376e8698570aa9e2523307739735b",
"manifests/backup/mysqlbackup.pp": "5862b516f646ac93e4279af9997760db",
"manifests/backup/mysqldump.pp": "6c4173813af1b8416ccbb8b116539779",
"manifests/backup/xtrabackup.pp": "5e139cd43871dc6abbfbf6ef983d4bec",
"manifests/bindings/client_dev.pp": "22caac5dc87099f19e930c045bd3b8ab",
"manifests/bindings/daemon_dev.pp": "835f8b31d04dc4e274554ebc521bfae4",
"manifests/bindings/java.pp": "594bed2948731d4707837f149a6a34dc",
@ -61,74 +60,69 @@
"manifests/client/install.pp": "26c737ee4b0ce3a4529dbf3368dd56d5",
"manifests/client.pp": "178235b85d2984e7b6245b3419eb9c58",
"manifests/db.pp": "74d31157579a8b41218c6d8de8149b21",
"manifests/params.pp": "868acd8e811598360eda4d4eba143de1",
"manifests/params.pp": "04bfb819c6a3094ccbd07f2a990ba945",
"manifests/server/account_security.pp": "e8547d61232dab8399fc1c026678f0e8",
"manifests/server/backup.pp": "1781622fb06122bbc119eb6f80b5bbe5",
"manifests/server/backup.pp": "53a8ca17a56e8295b80a0d17836139f9",
"manifests/server/binarylog.pp": "26117dc41eb385181e9b997d98ae1758",
"manifests/server/config.pp": "0eeaf180307330258598df1723ed9374",
"manifests/server/install.pp": "e00ad8cd4292540d6556c63a82bcf923",
"manifests/server/installdb.pp": "320b2242006cbd4d3f537b07df054f97",
"manifests/server/installdb.pp": "71b17ea1661be8f30c96ffdeb0ba96e6",
"manifests/server/monitor.pp": "3303efac7f345000b5d49ce8c807a513",
"manifests/server/mysqltuner.pp": "4011f744a433063c85c55de43c3040d6",
"manifests/server/providers.pp": "1ff9ff9f003b061c3a6a184c01ca734e",
"manifests/server/root_password.pp": "56a34e41d4d1f7818675579abc76d10b",
"manifests/server/service.pp": "0e37b66b3d68d734cccf6e18c50238e2",
"manifests/server.pp": "6b70b606446b85c38763c25c3332e4e0",
"metadata.json": "e52aa91fd96129b2f2113a22e5a61d9b",
"readmes/README_ja_JP.md": "18d5302aa8b6e984b190ac2b3e633999",
"readmes/REFERENCE_ja_JP.md": "8f395be104df61b6f20b96cf861d4307",
"spec/acceptance/locales_spec.rb": "5999c778fcbbe072b5302bd9a1b862a6",
"spec/acceptance/mysql_backup_spec.rb": "1e45476499232adfc732d4d7db084950",
"spec/acceptance/mysql_db_spec.rb": "cc23120fecd30fc1689ebbbd976c03c3",
"spec/acceptance/mysql_helper.rb": "5f9f41b66022b99b4630ba9b581e68cf",
"spec/acceptance/mysql_server_spec.rb": "c72db5ea61b0f3c4c0765d8cb6cf2fbf",
"spec/acceptance/nodesets/centos-7-x64.yml": "a713f3abd3657f0ae2878829badd23cd",
"spec/acceptance/nodesets/debian-8-x64.yml": "d2d2977900989f30086ad251a14a1f39",
"spec/acceptance/nodesets/default.yml": "b42da5a1ea0c964567ba7495574b8808",
"spec/acceptance/nodesets/docker/centos-7.yml": "8a3892807bdd62306ae4774f41ba11ae",
"spec/acceptance/nodesets/docker/debian-8.yml": "ac8e871d1068c96de5e85a89daaec6df",
"spec/acceptance/nodesets/docker/ubuntu-14.04.yml": "dc42ee922a96908d85b8f0f08203ce58",
"spec/acceptance/sql_task_spec.rb": "5ccb8605df65ac994b2e3ada87413a65",
"spec/acceptance/types/mysql_database_spec.rb": "18d2d82180d8f26e793d25d2853199b6",
"spec/acceptance/types/mysql_grant_spec.rb": "acaa270a0f778d3bd8e06836141fac6e",
"spec/acceptance/types/mysql_plugin_spec.rb": "3984c7432d3f8b8f7461e21e139776c5",
"spec/acceptance/types/mysql_user_spec.rb": "cbbbc765768c47cf40b754bfe7cc0ae0",
"manifests/server.pp": "c464de75bd973f2dbfb7f6d985f749a1",
"metadata.json": "06bc02feef5ad82ab399c2503c3c372d",
"provision.yaml": "a58ed874d86485e24cb4e13c1d37fb96",
"readmes/README_ja_JP.md": "f5adf27788eb36c2c1e19a10440f739a",
"readmes/REFERENCE_ja_JP.md": "e9df3acc508f15970e9231b58be26901",
"spec/acceptance/mysql_backup_spec.rb": "0822a52d47aa57e90faff4d8b29ea9de",
"spec/acceptance/mysql_db_spec.rb": "cedd794091296443c31dc39d1f76b7e4",
"spec/acceptance/mysql_server_spec.rb": "3fd29c2a95ceb9a576357a59ad421d0c",
"spec/acceptance/mysql_task_spec.rb": "b405660ce7cb30fd340aa54e0f4a91d5",
"spec/acceptance/types/mysql_database_spec.rb": "77775ed1c0173189e304a2e52f85977d",
"spec/acceptance/types/mysql_grant_spec.rb": "bccfd6eed611ee5c922baec05a227777",
"spec/acceptance/types/mysql_plugin_spec.rb": "5d68e4f537b1ebf9e5f61ede521e48c7",
"spec/acceptance/types/mysql_user_spec.rb": "fe70d4a4f7628c6a1a57b9a94ad6ea85",
"spec/classes/graceful_failures_spec.rb": "b87bf88de1903d81765ea2823e30b13f",
"spec/classes/mycnf_template_spec.rb": "41a4593b53d5ad9416f96d1c695efa0c",
"spec/classes/mysql_backup_mysqldump_spec.rb": "004f7675aae8a4184a3935a20bcac775",
"spec/classes/mysql_backup_xtrabackup_spec.rb": "2a615dae96572bf96e5c17627a2b4ee2",
"spec/classes/mysql_bindings_spec.rb": "cc74d765e235c986be88dc23b68bcc85",
"spec/classes/mysql_client_spec.rb": "8cbbecb97b11841730d1e6e761b55f9e",
"spec/classes/mysql_client_spec.rb": "da69cadaa56676ab232317c0b2255ec5",
"spec/classes/mysql_server_account_security_spec.rb": "fa9089b55ba0839a601e1b487d6f6958",
"spec/classes/mysql_server_backup_spec.rb": "476160ee6579495309ec11c2a081fdd9",
"spec/classes/mysql_server_backup_spec.rb": "cfc73d17d76a1ef5e27b5faf3e0f5158",
"spec/classes/mysql_server_monitor_spec.rb": "1e028eeb613ab7baa6d8ae2c9cf7366f",
"spec/classes/mysql_server_mysqltuner_spec.rb": "7fb608f515d9a0cc9efa8683fe9608e8",
"spec/classes/mysql_server_spec.rb": "b39d692016bb1bfb63c61bbc777bfbbb",
"spec/default_facts.yml": "d4442f09ee2f33f2d55f078d0ee2634f",
"spec/defines/mysql_db_spec.rb": "887b2f14e11059394ef4a0f22749fb5e",
"spec/functions/mysql_password_spec.rb": "3ef9614805abbb84a90a6abb2a4125e6",
"spec/functions/mysql_password_wrapper_spec.rb": "2aca8f8efb22d5e15f0f65185737fb2c",
"spec/default_facts.yml": "973bd7e9b429cde3c8d45d57c2fa21ed",
"spec/defines/mysql_db_spec.rb": "fba7016688860d20891fd74f0782c54c",
"spec/functions/mysql_normalise_and_deepmerge_spec.rb": "5b6bd36462373a304e1b1628655df7e4",
"spec/functions/mysql_password_spec.rb": "1a2b0cc8ef0b8e9b71e8c9211e8a2c2f",
"spec/functions/mysql_strip_hash_spec.rb": "40c9eccc3b09ca20ed7ce35930affe21",
"spec/functions/mysql_strip_hash_wrapper_spec.rb": "490087ed41ac163f2cc67b468088e6a4",
"spec/spec_helper.rb": "ca6173ee7c99d7952844ceb6398f28af",
"spec/spec_helper_acceptance.rb": "ee714af36b07fb0638b57c232ffdc9d2",
"spec/spec_helper_local.rb": "35d201e4b56adf60407d84c2a231b9ff",
"spec/unit/facter/mysql_server_id_spec.rb": "6cd165396028f68de96b8e66f1acadb6",
"spec/unit/facter/mysql_version_spec.rb": "0e555c398b189e20648ae6a037d106f6",
"spec/unit/facter/mysqld_version_spec.rb": "7af40a2b38b996684752b49f2cb64ec6",
"spec/spec_helper.rb": "7e33941d7d52fbd6964dae2a91090c6f",
"spec/spec_helper_acceptance.rb": "7a285d6e707935349a4b37eabdb3ae2a",
"spec/spec_helper_acceptance_local.rb": "2d3ae82096bcda4929d5e8b35f850a3c",
"spec/spec_helper_local.rb": "572d87438363ac1be58a01cbcfab24c5",
"spec/unit/facter/mysql_server_id_spec.rb": "f34e0c0cba144771006cb9fbbada3e70",
"spec/unit/facter/mysql_version_spec.rb": "6733d7021877568c29c7c41bf57850b6",
"spec/unit/facter/mysqld_version_spec.rb": "b1dab6f3dddad03c8eb32478bba715f5",
"spec/unit/puppet/functions/mysql_password_spec.rb": "82214310a621f86813dee0dfecaf27ca",
"spec/unit/puppet/provider/mysql_database/mysql_spec.rb": "05ab36956e6807e9e7056b61c2de05f1",
"spec/unit/puppet/provider/mysql_plugin/mysql_spec.rb": "033d476b84e766a455b7bfd403a67c2d",
"spec/unit/puppet/provider/mysql_user/mysql_spec.rb": "fd0434a5096d7083457600e72e3eda00",
"spec/unit/puppet/type/mysql_database_spec.rb": "8e790bec45c59bc48544d7ac446b2f25",
"spec/unit/puppet/type/mysql_grant_spec.rb": "f6aafaffed76df6cad9466defb30e34b",
"spec/unit/puppet/type/mysql_grant_spec.rb": "71d25d7baf50eec3172ace2372832c5e",
"spec/unit/puppet/type/mysql_plugin_spec.rb": "c4bfe6319219c10142667af520e09e2b",
"spec/unit/puppet/type/mysql_user_spec.rb": "3e56a74ff308a9744c6a915462093846",
"spec/unit/puppet/type/mysql_user_spec.rb": "4fce87af644041f0c5e44a5a43c21410",
"tasks/export.json": "81c6eee3500d31843221da03e75a9f7b",
"tasks/export.rb": "bed98c19b371cef7f4b1a54d273842de",
"tasks/export.rb": "06686cb9e90ac679d9325c6d3a700010",
"tasks/sql.json": "f57ad96a8079e6729ff7557f9ac6fa62",
"tasks/sql.rb": "b6428a942317640b2b23d2776faac505",
"tasks/sql.rb": "0047767443883b5a821cb4b2c5f99843",
"templates/meb.cnf.erb": "b6422b19ee97b8a2883bfac44fdc0292",
"templates/my.cnf.erb": "535d2ff37fea6b11ad928224965143d3",
"templates/my.cnf.pass.erb": "11f80afb0993a436f074a43f70733999",
"templates/mysqlbackup.sh.erb": "5ef94baab34d6061798b7381de89d1d5",
"templates/xtrabackup.sh.erb": "ebcf249f36fd947e2daf5cff92367a14"
"templates/mysqlbackup.sh.erb": "e08606c65a2c6e9c4f07d074e44d68fa",
"templates/xtrabackup.sh.erb": "28a85fc52f69f117177c162acb317fa6"
}

@ -0,0 +1,25 @@
team-modules/puppetlabs-mysql:
PreBuild:
- source /opt/rh/rh-ruby25/enable
- echo "--- LETS update BUNDLER ---"
- bundle install --path vendor/bundle --jobs 3
Build:
- echo "--- PROVISIONING ---"
- source /opt/rh/rh-ruby25/enable
- bundle exec rake litmus:provision_list[release_checks]
- cat inventory.yaml
- echo "--- AGENT INSTALLATION ---"
- bundle exec rake litmus:install_agent
- echo "--- MODULE INSTALLATION ---"
- bundle exec rake litmus:install_module
- echo "--- TESTS RUNNING ---"
- bundle exec rake litmus:acceptance:parallel
AfterBuildSuccess:
- source /opt/rh/rh-ruby25/enable
- bundle exec rake litmus:tear_down
AfterBuildFailure:
- source /opt/rh/rh-ruby25/enable
- bundle exec rake litmus:tear_down
CommitData:
- RepoType: Git
- RepoPath: .

@ -1,4 +1,5 @@
Facter.add('mysql_version') do
confine { Facter::Core::Execution.which('mysql') }
setcode do
mysql_ver = Facter::Util::Resolution.exec('mysql --version')
mysql_ver.match(%r{\d+\.\d+\.\d+})[0] if mysql_ver

@ -1,4 +1,5 @@
Facter.add('mysqld_version') do
confine { Facter::Core::Execution.which('mysqld') }
setcode do
Facter::Util::Resolution.exec('mysqld --no-defaults -V 2>/dev/null')
end

@ -0,0 +1,67 @@
# @summary Recursively merges two or more hashes together, normalises keys with differing use of dashesh and underscores,
# then returns the resulting hash.
#
# @example
# $hash1 = {'one' => 1, 'two' => 2, 'three' => { 'four' => 4 } }
# $hash2 = {'two' => 'dos', 'three' => { 'five' => 5 } }
# $merged_hash = mysql::normalise_and_deepmerge($hash1, $hash2)
# # The resulting hash is equivalent to:
# # $merged_hash = { 'one' => 1, 'two' => 'dos', 'three' => { 'four' => 4, 'five' => 5 } }
#
# - When there is a duplicate key that is a hash, they are recursively merged.
# - When there is a duplicate key that is not a hash, the key in the rightmost hash will "win."
# - When there are conficting uses of dashes and underscores in two keys (which mysql would otherwise equate), the rightmost style will win.
#
Puppet::Functions.create_function(:'mysql::normalise_and_deepmerge') do
def normalise_and_deepmerge(*args)
if args.length < 2
raise Puppet::ParseError, _('mysql::normalise_and_deepmerge(): wrong number of arguments (%{args_length}; must be at least 2)') % { args_length: args.length }
end
result = {}
args.each do |arg|
next if arg.is_a?(String) && arg.empty? # empty string is synonym for puppet's undef
# If the argument was not a hash, skip it.
unless arg.is_a?(Hash)
raise Puppet::ParseError, _('mysql::normalise_and_deepmerge: unexpected argument type %{arg_class}, only expects hash arguments.') % { args_class: args.class }
end
# We need to make a copy of the hash since it is frozen by puppet
current = deep_copy(arg)
# Now we have to traverse our hash assigning our non-hash values
# to the matching keys in our result while following our hash values
# and repeating the process.
overlay(result, current)
end
result
end
def normalized?(hash, key)
return true if hash.key?(key)
return false unless key =~ %r{-|_}
other_key = key.include?('-') ? key.tr('-', '_') : key.tr('_', '-')
return false unless hash.key?(other_key)
hash[key] = hash.delete(other_key)
true
end
def overlay(hash1, hash2)
hash2.each do |key, value|
if normalized?(hash1, key) && value.is_a?(Hash) && hash1[key].is_a?(Hash)
overlay(hash1[key], value)
else
hash1[key] = value
end
end
end
def deep_copy(inputhash)
return inputhash unless inputhash.is_a? Hash
hash = {}
inputhash.each do |k, v|
hash.store(k, deep_copy(v))
end
hash
end
end

@ -1,21 +0,0 @@
# @summary
# A wrapper for the 4.x function 'mysql::password' to bridge the gap between
# it and the 3.x function 'mysql_password'.
#
Puppet::Functions.create_function(:mysql_password) do
# @param password
# Plain text password.
#
# @return
# The mysql password hash from the 4.x function mysql::password.
#
dispatch :mysql_password do
required_param 'String', :password
return_type 'String'
end
def mysql_password(password)
call_function('deprecation', 'mysql_password', "This method has been deprecated, please use the namespaced version 'mysql::password' instead.")
call_function('mysql::password', password)
end
end

@ -1,21 +0,0 @@
# @summary
# A wrapper for the 4.x function 'mysql::strip_hash' to bridge the gap between
# it and the 3.x function 'mysql_strip_hash'.
#
Puppet::Functions.create_function(:mysql_strip_hash) do
# @param hash
# Hash to be stripped
#
# @return hash
# The given hash with all blank entries removed
#
dispatch :mysql_strip_hash do
required_param 'Hash', :hash
return_type 'Hash'
end
def mysql_strip_hash(hash)
call_function('deprecation', 'mysql_strip_hash', "This method has been deprecated, please use the namespaced version 'mysql::strip_hash' instead.")
call_function('mysql::strip_hash', hash)
end
end

@ -1,19 +0,0 @@
# When given a hash this function strips out all blank entries.
module Puppet::Parser::Functions
newfunction(:mysql_strip_hash, type: :rvalue, arity: 1, doc: <<-EOS
TEMPORARY FUNCTION: EXPIRES 2014-03-10
When given a hash this function strips out all blank entries.
EOS
) do |args|
hash = args[0]
unless hash.is_a?(Hash)
raise(Puppet::ParseError, _('mysql_strip_hash(): Requires a hash to work.'))
end
# Filter out all the top level blanks.
hash.reject { |_k, v| v == '' }.each do |_k, v|
v.reject! { |_ki, vi| vi == '' } if v.is_a?(Hash)
end
end
end

@ -17,6 +17,10 @@ class Puppet::Provider::Mysql < Puppet::Provider
'/opt/rh/rh-mariadb100/root/usr/lib64',
'/opt/rh/rh-mariadb101/root/usr/lib',
'/opt/rh/rh-mariadb101/root/usr/lib64',
'/opt/rh/rh-mariadb102/root/usr/lib',
'/opt/rh/rh-mariadb102/root/usr/lib64',
'/opt/rh/rh-mariadb103/root/usr/lib',
'/opt/rh/rh-mariadb103/root/usr/lib64',
'/opt/rh/mysql55/root/usr/lib',
'/opt/rh/mysql55/root/usr/lib64',
'/opt/rh/mariadb55/root/usr/lib',
@ -81,6 +85,14 @@ class Puppet::Provider::Mysql < Puppet::Provider
self.class.newer_than(forks_versions)
end
def self.older_than(forks_versions)
forks_versions.keys.include?(mysqld_type) && Puppet::Util::Package.versioncmp(mysqld_version, forks_versions[mysqld_type]) < 0
end
def older_than(forks_versions)
self.class.older_than(forks_versions)
end
def defaults_file
self.class.defaults_file
end
@ -89,9 +101,9 @@ class Puppet::Provider::Mysql < Puppet::Provider
if type.eql? 'system'
if File.file?("#{Facter.value(:root_home)}/.mylogin.cnf")
ENV['MYSQL_TEST_LOGIN_FILE'] = "#{Facter.value(:root_home)}/.mylogin.cnf"
mysql_raw(['--host=', system_database, '-e', text_of_sql].flatten.compact)
mysql_raw([system_database, '-e', text_of_sql].flatten.compact)
else
mysql_raw([defaults_file, '--host=', system_database, '-e', text_of_sql].flatten.compact)
mysql_raw([defaults_file, system_database, '-e', text_of_sql].flatten.compact)
end
elsif type.eql? 'regular'
if File.file?("#{Facter.value(:root_home)}/.mylogin.cnf")

@ -17,6 +17,10 @@ Puppet::Type.type(:mysql_datadir).provide(:mysql, parent: Puppet::Provider::Mysq
'/opt/rh/rh-mariadb101/root/usr/libexec',
'/opt/rh/rh-mariadb100/root/usr/bin',
'/opt/rh/rh-mariadb100/root/usr/libexec',
'/opt/rh/rh-mariadb102/root/usr/bin',
'/opt/rh/rh-mariadb102/root/usr/libexec',
'/opt/rh/rh-mariadb103/root/usr/bin',
'/opt/rh/rh-mariadb103/root/usr/libexec',
'/opt/rh/mysql55/root/usr/bin',
'/opt/rh/mysql55/root/usr/libexec',
'/opt/rh/mariadb55/root/usr/bin',

@ -14,7 +14,10 @@ Puppet::Type.type(:mysql_user).provide(:mysql, parent: Puppet::Provider::Mysql)
## Default ...
# rubocop:disable Metrics/LineLength
query = "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, SSL_TYPE, SSL_CIPHER, X509_ISSUER, X509_SUBJECT, PASSWORD /*!50508 , PLUGIN */ FROM mysql.user WHERE CONCAT(user, '@', host) = '#{name}'"
elsif newer_than('mysql' => '5.7.6', 'percona' => '5.7.6', 'mariadb' => '10.2.16')
elsif newer_than('mysql' => '5.7.6', 'percona' => '5.7.6') ||
# https://jira.mariadb.org/browse/MDEV-16238 https://jira.mariadb.org/browse/MDEV-16774
(newer_than('mariadb' => '10.2.16') && older_than('mariadb' => '10.2.19')) ||
(newer_than('mariadb' => '10.3.8') && older_than('mariadb' => '10.3.11'))
query = "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, SSL_TYPE, SSL_CIPHER, X509_ISSUER, X509_SUBJECT, AUTHENTICATION_STRING, PLUGIN FROM mysql.user WHERE CONCAT(user, '@', host) = '#{name}'"
else
query = "SELECT MAX_USER_CONNECTIONS, MAX_CONNECTIONS, MAX_QUESTIONS, MAX_UPDATES, SSL_TYPE, SSL_CIPHER, X509_ISSUER, X509_SUBJECT, PASSWORD /*!50508 , PLUGIN */ FROM mysql.user WHERE CONCAT(user, '@', host) = '#{name}'"

@ -2,8 +2,6 @@ Puppet::Type.newtype(:mysql_grant) do
@doc = <<-PUPPET
@summary
Manage a MySQL user's rights.
@api private
PUPPET
ensurable
@ -35,12 +33,12 @@ Puppet::Type.newtype(:mysql_grant) do
end
# rubocop:enable Style/MultilineBlockChain
validate do
raise(_('`privileges` `parameter` is required.')) if self[:ensure] == :present && self[:privileges].nil?
raise(_('`privileges` `parameter`: PROXY can only be specified by itself.')) if Array(self[:privileges]).count > 1 && Array(self[:privileges]).include?('PROXY')
raise(_('`table` `parameter` is required.')) if self[:ensure] == :present && self[:table].nil?
raise(_('`user` `parameter` is required.')) if self[:ensure] == :present && self[:user].nil?
raise(_('mysql_grant: `privileges` `parameter` is required.')) if self[:ensure] == :present && self[:privileges].nil?
raise(_('mysql_grant: `privileges` `parameter`: PROXY can only be specified by itself.')) if Array(self[:privileges]).count > 1 && Array(self[:privileges]).include?('PROXY')
raise(_('mysql_grant: `table` `parameter` is required.')) if self[:ensure] == :present && self[:table].nil?
raise(_('mysql_grant: `user` `parameter` is required.')) if self[:ensure] == :present && self[:user].nil?
if self[:user] && self[:table]
raise(_('`name` `parameter` must match user@host/table format.')) if self[:name] != "#{self[:user]}/#{self[:table]}"
raise(_('mysql_grant: `name` `parameter` must match user@host/table format.')) if self[:name] != "#{self[:user]}/#{self[:table]}"
end
end
@ -58,7 +56,7 @@ Puppet::Type.newtype(:mysql_grant) do
validate do |value|
mysql_version = Facter.value(:mysql_version)
if value =~ %r{proxy}i && Puppet::Util::Package.versioncmp(mysql_version, '5.5.0') < 0
raise(ArgumentError, _('PROXY user not supported on mysql versions < 5.5.0. Current version %{version}.') % { version: mysql_version })
raise(ArgumentError, _('mysql_grant: PROXY user not supported on mysql versions < 5.5.0. Current version %{version}.') % { version: mysql_version })
end
end
end
@ -68,7 +66,7 @@ Puppet::Type.newtype(:mysql_grant) do
validate do |value|
if Array(@resource[:privileges]).include?('PROXY') && !%r{^[0-9a-zA-Z$_]*@[\w%\.:\-\/]*$}.match(value)
raise(ArgumentError, _('`table` `property` for PROXY should be specified as proxy_user@proxy_host.'))
raise(ArgumentError, _('mysql_grant: `table` `property` for PROXY should be specified as proxy_user@proxy_host.'))
end
end
@ -97,15 +95,15 @@ Puppet::Type.newtype(:mysql_grant) do
user_part = matches[1]
host_part = matches[2]
else
raise(ArgumentError, _('Invalid database user %{user}.') % { user: value })
raise(ArgumentError, _('mysql_grant: Invalid database user %{user}.') % { user: value })
end
# rubocop:enable Lint/AssignmentInCondition
# rubocop:enable Lint/UselessAssignment
mysql_version = Facter.value(:mysql_version)
unless mysql_version.nil?
raise(ArgumentError, _('MySQL usernames are limited to a maximum of 16 characters.')) if Puppet::Util::Package.versioncmp(mysql_version, '5.7.8') < 0 && user_part.size > 16
raise(ArgumentError, _('MySQL usernames are limited to a maximum of 32 characters.')) if Puppet::Util::Package.versioncmp(mysql_version, '10.0.0') < 0 && user_part.size > 32
raise(ArgumentError, _('MySQL usernames are limited to a maximum of 80 characters.')) if Puppet::Util::Package.versioncmp(mysql_version, '10.0.0') > 0 && user_part.size > 80
raise(ArgumentError, _('mysql_grant: MySQL usernames are limited to a maximum of 16 characters.')) if Puppet::Util::Package.versioncmp(mysql_version, '5.7.8') < 0 && user_part.size > 16
raise(ArgumentError, _('mysql_grant: MySQL usernames are limited to a maximum of 32 characters.')) if Puppet::Util::Package.versioncmp(mysql_version, '10.0.0') < 0 && user_part.size > 32
raise(ArgumentError, _('mysql_grant: MySQL usernames are limited to a maximum of 80 characters.')) if Puppet::Util::Package.versioncmp(mysql_version, '10.0.0') > 0 && user_part.size > 80
end
end

@ -3,8 +3,6 @@ Puppet::Type.newtype(:mysql_user) do
@doc = <<-PUPPET
@summary
Manage a MySQL user. This includes management of users password as well as privileges.
@api private
PUPPET
ensurable

<
@ -4,27 +4,29 @@
# @api private
#
class mysql::backup::mysqlbackup (
$backupuser = '',
$backuppassword = '',
$maxallowedpacket = '1M',
$backupdir = '',
$backupdirmode = '0700',
$backupdirowner = 'root',
$backupdirgroup = $mysql::params::root_group,
$backupcompress = true,
$backuprotate = 30,
$ignore_events = true,
$delete_before_dump = false,
$backupdatabases = [],
$file_per_database = false,
$include_triggers = true,