- add eyaml support for role - add /data volume for galera cluster members - create profiles::selinux namespace for defining selinux configuration - create profiles::selinux::mysqld for managing specifics for mysqld - create profiles::selinux::setenforce to manage selinux mode - parameterised options required in mysqld::server module - add mariadb repo - add additional facts for managing mysqld and galera
17 lines
511 B
Ruby
17 lines
511 B
Ruby
# frozen_string_literal: true
|
|
|
|
# check if the mariadb server exists
|
|
# check if the mariadb_datapath fact exists, else set /var/lib/mysql as the datapath
|
|
# check if the galera grastate.dat file exists, identifying if galera is boostrapped
|
|
require 'facter'
|
|
|
|
if system('systemctl is-active --quiet mariadb')
|
|
|
|
Facter.add('mariadb_galera_active') do
|
|
setcode do
|
|
mariadb_datapath = Facter.value(:mariadb_datapath) || '/var/lib/mysql'
|
|
File.exist?("#{mariadb_datapath}/grastate.dat")
|
|
end
|
|
end
|
|
end
|