diff --git a/site-modules/profile/lib/facter/ceph_mgr_modules.rb b/site-modules/profile/lib/facter/ceph_mgr_modules.rb index 4dd70adb..a82cfcaf 100644 --- a/site-modules/profile/lib/facter/ceph_mgr_modules.rb +++ b/site-modules/profile/lib/facter/ceph_mgr_modules.rb @@ -1,14 +1,14 @@ require 'json' Facter.add('ceph_mgr_modules') do setcode do if File.exist?('/var/lib/ceph/mgr') data = Facter::Core::Execution.execute('ceph mgr module ls').strip - if data + if !data.empty? JSON.parse(data) else {} end end end end