Skip to content

Commit

Permalink
older versions of puppet don't know about the --to_yaml option
Browse files Browse the repository at this point in the history
switching back to scanning the result

fixes voxpupuli#118
  • Loading branch information
Martin Alfke committed Nov 24, 2017
1 parent 860b8b7 commit 1e8cd57
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/facter/alert_manager_running.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
Facter.add('prometheus_alert_manager_running') do
setcode do
svc_status = YAML.load(Facter::Core::Execution.exec('puppet resource service alert_manager --to_yaml'))
svc_status['service']['alert_manager']['ensure']
Facter::Core::Execution.exec('puppet resource service alert_manager').scan('running')[0]
end
end

0 comments on commit 1e8cd57

Please sign in to comment.