Skip to content
Snippets Groups Projects

Fake the systemd_available fact according to the OS

Closed Alex Iribarren requested to merge systemd_fact into master
1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
@@ -20,6 +20,11 @@ if Dir.exist?(File.expand_path('../../lib', __FILE__)) && RUBY_VERSION !~ %r{^1.
end
end
# Fake the systemd_available fact for RedHat-like 7 and up
RspecPuppetFacts.add_custom_fact('dummy_systemd', ->(_os, _facts) {
_facts[:systemd_available] = (_facts[:osfamily] == 'RedHat' and _facts[:operatingsystemmajrelease].to_i >= 7) ? true : false
})
RSpec.configure do |c|
default_facts = {
puppetversion: Puppet.version,
Loading