diff --git a/lib/facter/alert_manager_running.rb b/lib/facter/alert_manager_running.rb index 660b85cbd..8c2908a0f 100644 --- a/lib/facter/alert_manager_running.rb +++ b/lib/facter/alert_manager_running.rb @@ -4,6 +4,10 @@ Facter.add('prometheus_alert_manager_running') do setcode do - service.provider.status == :running + begin + service.provider.status == :running + rescue Puppet::Error + false + end end end