Skip to content

Commit

Permalink
Fail silently when service is not installed
Browse files Browse the repository at this point in the history
Addresses voxpupuli#142
  • Loading branch information
vladgh committed Jan 10, 2018
1 parent b08e274 commit c3d42cc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/facter/alert_manager_running.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c3d42cc

Please sign in to comment.