puppet-prod/modules/libs/lib/facter/mariadb_active.rb

12 lines
248 B
Ruby

# frozen_string_literal: true
# create a boolean for when the mariadb service is active
require 'English'
Facter.add('mariadb_active') do
setcode do
system('systemctl is-active --quiet mariadb')
$CHILD_STATUS.exitstatus.zero?
end
end