File: mysqld_version.rb

package info (click to toggle)
puppet-module-puppetlabs-mysql 15.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 968 kB
  • sloc: ruby: 1,648; sh: 43; makefile: 5
file content (9 lines) | stat: -rw-r--r-- 353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
# frozen_string_literal: true

Facter.add('mysqld_version') do
  confine { Facter::Core::Execution.which('mysqld') || Facter::Core::Execution.which('/usr/libexec/mysqld') }
  setcode do
    # Add /usr/libexec to PATH to find mysqld command
    Facter::Core::Execution.execute('env PATH=$PATH:/usr/libexec mysqld --no-defaults -V 2>/dev/null')
  end
end