Skip to content

Commit

Permalink
Fail silently when service is not installed
Browse files Browse the repository at this point in the history
Addresses #142
  • Loading branch information
vladgh committed Jan 10, 2018
1 parent 8d2c271 commit 6fc08ce
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 6fc08ce

Please sign in to comment.