Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
icinga2x: Use Dashing Systemd service
Browse files Browse the repository at this point in the history
fixes #48
  • Loading branch information
Michael Friedrich committed Apr 22, 2017
1 parent 1368024 commit 9d9e9c2
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions icinga2x/manifests/default.pp
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,6 @@
ensure => 'installed',
require => Class['epel']
}->
file { 'gemrc':
name => '/etc/gemrc',
owner => root,
group => root,
mode => '0644',
source => "puppet:////vagrant/files/etc/gemrc",
}->
vcsrepo { '/usr/share/dashing-icinga2':
ensure => 'present',
path => '/usr/share/dashing-icinga2',
Expand All @@ -467,18 +460,29 @@
command => "cd /usr/share/dashing-icinga2 && bundle install --jobs 4 --system", # this already installs the dashing binary
timeout => 1800
}->
file { '/usr/local/bin/restart-dashing':
ensure => link,
force => true,
target => '/usr/share/dashing-icinga2/restart-dashing'
} ->
exec { 'dashing-start':
# fix path to /usr/local/bin, we don't have profile.d/env.sh yet
path => '/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin',
command => "/usr/share/dashing-icinga2/restart-dashing",
file { '/usr/lib/systemd/system/dashing-icinga2.service':
owner => root,
group => root,
mode => '0644',
source => '/usr/share/dashing-icinga2/tools/systemd/dashing-icinga2.service',
}
->
exec { 'dashing-reload-systemd':
command => 'systemctl daemon-reload',
path => ['/usr/bin', '/usr/sbin', '/bin', '/sbin'],
refreshonly => true,
}
->
service { 'dashing-icinga2':
provider => 'systemd',
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
require => Service['icinga2'],
}


####################################
# Graphite
####################################
Expand Down

0 comments on commit 9d9e9c2

Please sign in to comment.