From c2679515711a08955c508cbe76db616b09e13bb5 Mon Sep 17 00:00:00 2001 From: Daniel Carabas Date: Fri, 14 Aug 2020 13:51:33 +0300 Subject: [PATCH] Fix for rh-mysql80 --- examples/rh-mysql80-server.pp | 22 ++++++++++++++++++++++ lib/puppet/provider/mysql.rb | 2 ++ lib/puppet/provider/mysql_datadir/mysql.rb | 2 ++ 3 files changed, 26 insertions(+) create mode 100644 examples/rh-mysql80-server.pp diff --git a/examples/rh-mysql80-server.pp b/examples/rh-mysql80-server.pp new file mode 100644 index 000000000..ef3a71122 --- /dev/null +++ b/examples/rh-mysql80-server.pp @@ -0,0 +1,22 @@ +file {'/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo': + source => 'https://raw.githubusercontent.com/sclorg/centos-release-scl/master/centos-release-scl/RPM-GPG-KEY-CentOS-SIG-SCLo' +} + +yumrepo { 'centos-sclo-rh': + ensure => present, + name => 'CentOS-SCLo-scl-rh', + enabled => true, + baseurl => 'http://mirror.centos.org/centos/7/sclo/$basearch/rh/', + mirrorlist => 'http://mirrorlist.centos.org?arch=$basearch&release=7&repo=sclo-rh', + descr => 'CentOS-7 - SCLo rh', + gpgcheck => true, + gpgkey => 'file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo', +} +class {'mysql::server': + package_name => 'rh-mysql80', + package_ensure => 'installed', + service_name => 'rh-mysql80-mysqld', + config_file => '/etc/my.cnf', + includedir => '/etc/my.cnf.d', + options => { mysqld => { log_error => '/var/log/mysqld.log', datadir => '/var/lib/mysql' } } +} diff --git a/lib/puppet/provider/mysql.rb b/lib/puppet/provider/mysql.rb index 6e1caf2cd..dd261ab3b 100644 --- a/lib/puppet/provider/mysql.rb +++ b/lib/puppet/provider/mysql.rb @@ -13,6 +13,8 @@ class Puppet::Provider::Mysql < Puppet::Provider '/opt/rh/rh-mysql56/root/usr/lib64', '/opt/rh/rh-mysql57/root/usr/lib', '/opt/rh/rh-mysql57/root/usr/lib64', + '/opt/rh/rh-mysql80/root/usr/lib', + '/opt/rh/rh-mysql80/root/usr/lib64', '/opt/rh/rh-mariadb100/root/usr/lib', '/opt/rh/rh-mariadb100/root/usr/lib64', '/opt/rh/rh-mariadb101/root/usr/lib', diff --git a/lib/puppet/provider/mysql_datadir/mysql.rb b/lib/puppet/provider/mysql_datadir/mysql.rb index 9f8562bb0..88b8fa35b 100644 --- a/lib/puppet/provider/mysql_datadir/mysql.rb +++ b/lib/puppet/provider/mysql_datadir/mysql.rb @@ -9,6 +9,8 @@ ENV['PATH'], '/usr/libexec', '/usr/share/mysql/scripts', + '/opt/rh/rh-mysql80/root/usr/bin', + '/opt/rh/rh-mysql80/root/usr/libexec', '/opt/rh/rh-mysql57/root/usr/bin', '/opt/rh/rh-mysql57/root/usr/libexec', '/opt/rh/rh-mysql56/root/usr/bin',